Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4191077ybc; Fri, 15 Nov 2019 00:01:17 -0800 (PST) X-Google-Smtp-Source: APXvYqyGdFy1OgG516E5yzqqTlbnYGS0YxfCT7fJRBLCivp3QFOBawm2SNmp7nfW/29ns2OHgy0Q X-Received: by 2002:a17:906:24d4:: with SMTP id f20mr12349821ejb.182.1573804877291; Fri, 15 Nov 2019 00:01:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573804877; cv=none; d=google.com; s=arc-20160816; b=mjTLaiI42S48YK3bkQveh00v9pKwejW32dSZxm+ZfyriQl13JghC5zQD2hH/8gbEJF HYPv/YJ+2wxFD2p3mQzh+YDuLkszZAl9z6fpTNtYo5PzzeHujD9y14upX13tDyrfl9tZ lNhkfMNRrC/3V8hM0y+1wfY7Dyvqngnm92IBqrWmFoM4EiBhqRJ4Tzu/Bt+FP3BE1QjY htoCnmNbcyFO4cciG7Mi7/MSCGp7tgqHOcE/gi4W72ufzHLhfUvcDCWdk3MyOQOduXcn y9Fvfug7+aW9qX3JrgZfs5462zLzYxw3m7dEbh8k1LK7581MCgEDWZszDfJsNwDNDh2Z X1wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=zLHtq3yfrffU9o2nF0X7zoTmdgeT+a2HOFrUz+0J25Q=; b=i3X1Pmb+2Sbe2C0dPLvolvvTUNgSiS7rPZR87QSlPUIepuG2tOBK2V6u0ASJjg9SYx 5I3Is1oau0wXqU/QmzvAhu6cE1Ms18ecH4wZRL+C3iSYQruJhM8YP5+xgycmQX2I4mAE QPOeym1fFJqUjaZ7+579/AUqFZ453Z2p1l98v2jKTNvq7bkRR4knokQhwYL4dMrYbMWg SKtls/Z6Qh/M4ENeXNSuGhWKTgGXwWZt2f1T6i62BZun4wa55+38oKstih6e8H1w0m9L BkFHjFLPfO305gwGLkGhR6EtYwk1cF14dNJqkSG2uMgCyUa54d3s2jgYfDlFn69yzdXX TuaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=BjHqHXiG; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b22si5311075ejv.159.2019.11.15.00.00.51; Fri, 15 Nov 2019 00:01:17 -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=@rasmusvillemoes.dk header.s=google header.b=BjHqHXiG; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726717AbfKOH5H (ORCPT + 99 others); Fri, 15 Nov 2019 02:57:07 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:38592 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726182AbfKOH5H (ORCPT ); Fri, 15 Nov 2019 02:57:07 -0500 Received: by mail-lf1-f68.google.com with SMTP id q28so7291053lfa.5 for ; Thu, 14 Nov 2019 23:57:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=zLHtq3yfrffU9o2nF0X7zoTmdgeT+a2HOFrUz+0J25Q=; b=BjHqHXiGMgpJVRBuo+lq+sEes/L+3Pgkfq4t22+sAm3ZkEfNZJjCgNxK0Lq2+SC82z q4IiSNGldEN1uq+0oO7YsbEQj/jG8NjDGr2TQGUPclpVxjdT+bLba2JJiXE7NvHKORtO xVd6o/D+7FumLWsNsyWQxMok7BRgJFk6bpv/4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zLHtq3yfrffU9o2nF0X7zoTmdgeT+a2HOFrUz+0J25Q=; b=VVaBVn6G0c/ImGFv58aLOhnrpymdreolbQbD+oZYjQDS4EQjkLdL0DCXHc39vybNN6 5b4vq91dG0b8oxctFGqfDIn+M/oX/uacrj5AyVr5z25KoLd1dHzbq6lZbrFVbT6mSVGv rnlz7ESpo6zYnCALRh0Jb++d8fV0c0p/qIC1Wjx/MPgdArCBsP3rL4koHCKNWTK4x0gd is6p3xv0GJa/zATe9uAqVnnvIaHaFdkWOQ+f4LhCmn6mVyBEuJA6b5HuVQ8sW4kVMX9Q 3zC6ZThjyq9S0cCpav6+1Jd1gFffpQ1Za2oDKR7bDHqSM1S+jYxKcXnATZfERmRqvRn5 M/Fw== X-Gm-Message-State: APjAAAUK6WO52B0nv3wx/YCZ2JyrJRgGLhmysexDv6mPNTDDrqUOtZdF noSeD+QH85iVKo8xVregaQCChQ== X-Received: by 2002:ac2:5236:: with SMTP id i22mr10287608lfl.19.1573804623889; Thu, 14 Nov 2019 23:57:03 -0800 (PST) Received: from [172.16.11.28] ([81.216.59.226]) by smtp.gmail.com with ESMTPSA id z21sm4888837lfg.0.2019.11.14.23.57.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Nov 2019 23:57:03 -0800 (PST) Subject: Re: [PATCH v4 32/47] serial: ucc_uart: use of_property_read_u32() in ucc_uart_probe() To: Timur Tabi Cc: Qiang Zhao , Li Yang , Christophe Leroy , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel , lkml , Scott Wood , linux-serial@vger.kernel.org References: <20191108130123.6839-1-linux@rasmusvillemoes.dk> <20191108130123.6839-33-linux@rasmusvillemoes.dk> From: Rasmus Villemoes Message-ID: Date: Fri, 15 Nov 2019 08:57:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/11/2019 05.25, Timur Tabi wrote: > 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. > Sure, I can do that.