Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4047190ybc; Thu, 14 Nov 2019 20:29:12 -0800 (PST) X-Google-Smtp-Source: APXvYqyBqN3vl7H64Jzxakq3e9a8il1KKxEG4N2lOmYGqxPMYY+Tx3wREKxJRM+iqZR0xD/VjkPo X-Received: by 2002:a17:906:938c:: with SMTP id l12mr10688271ejx.135.1573792152084; Thu, 14 Nov 2019 20:29:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573792152; cv=none; d=google.com; s=arc-20160816; b=ifsDFCIWGAutsmSrBueIn80zB8vNLz0eg+EARoRfZjqhjbGTjcmRa3oChwkHmQ2irj X3oHLXs/NHclzThGccIAWmU7TgkfNK13lmRSEoeux6g2QhVMWv3cRyoVXqw2XZxNI/nA QxNw37bOSs6ZIQGejGEm+2679eIy2dxyeKk3iTbL97GyP+7LXeEZn+P4GB8St5mqkH+x ED5ZhuHpD2NuuPF4T8ycOCAMOxfOEN9FzXY67UnswR+AqBiwr+EklvMz5vpj+PwZnkJ8 lYgjokKYzEUA7ZJLTyN9eSehtRIs2iBEpl5UbFJpbtchjtfu88kmdZZr7sw75uKBFJhT //9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=z/8ZXk3keCjb89Y3gdVfAI5LU0ihOolBA0c6sINdJlo=; b=WCxuMV05A/hYvrWPe1uFGu/AfgBluGYeASbnLPdmPkHupFgT2brflmc06V95eHuKqz 60NNbrvzLuTBs0IdI/jXWGq92rem4Nfl7pucGKcIYcN4DFsC6j5Dx0l9rOF98EL7asU8 iaC9Sak5aM0H3c4OHpttN3Y7Nml9Xu6/E5MQgjqcjE4Lq200XKCYNLnvHodbYmB03Y4W PoNgb1j8+38il5HENBXLvs6ekW1atw6uedRbndgBtCaUgHfGx6rQFZiphdTEkm9YmvJ4 JNS1iXiNQdgy88MEAZSkt7PiKgoOJwCLSqQ3clrsRwvg1WR30oMfuO4igKYRCbDplm6V p86g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KRpj0jxq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pj27si4684509ejb.241.2019.11.14.20.28.46; Thu, 14 Nov 2019 20:29:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KRpj0jxq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727141AbfKOE0b (ORCPT + 99 others); Thu, 14 Nov 2019 23:26:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:50124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726661AbfKOE0b (ORCPT ); Thu, 14 Nov 2019 23:26:31 -0500 Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 760A020731; Fri, 15 Nov 2019 04:26:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573791990; bh=9wOq687Qi/2lX8IlVmx3X62wxNLXabR/kcOYgP+5Zic=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=KRpj0jxqSegt9Nw4hWezOFc+3piXWWS0uzU6orlkh5W/H0zEhswSnT8XaLD7HuLtl 7oHNud3SfJmDxTgZ33qFavoPYuHMwP59ZF93vdykTnucwKJyjd3s/0RUwBlDBMwson RMC9Epl151y4HMRqHoOmLSH2j+LfU+ftqc9i7S7w= Received: by mail-qk1-f171.google.com with SMTP id m125so7097973qkd.8; Thu, 14 Nov 2019 20:26:30 -0800 (PST) X-Gm-Message-State: APjAAAUE7B22djlh3bhDr1bgenZ1puDZKlUVv9mDHXGiqc0xoN1Ltnms BTL6PDC8BJl6rcaclxJ/GfY/0LOcsSwv1Hn2RDQ= X-Received: by 2002:a37:9d44:: with SMTP id g65mr10614078qke.302.1573791989555; Thu, 14 Nov 2019 20:26:29 -0800 (PST) MIME-Version: 1.0 References: <20191108130123.6839-1-linux@rasmusvillemoes.dk> <20191108130123.6839-33-linux@rasmusvillemoes.dk> In-Reply-To: <20191108130123.6839-33-linux@rasmusvillemoes.dk> From: Timur Tabi Date: Thu, 14 Nov 2019 22:25:52 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 32/47] serial: ucc_uart: use of_property_read_u32() in ucc_uart_probe() To: Rasmus Villemoes Cc: Qiang Zhao , Li Yang , Christophe Leroy , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel , lkml , Scott Wood , linux-serial@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 8, 2019 at 7:03 AM Rasmus Villemoes wrote: > > + if (of_property_read_u32(np, "cell-index", &val) && > + of_property_read_u32(np, "device-id", &val)) { I know that this is technically correct, but it's obfuscated IMHO. 'val' is set correctly only when of_property_read_u32(...) is "false", which is doubly-weird because of_property_read_u32(...) doesn't actually return a boolean. I would rather you break this into two if-statements like the original code.