Received: by 10.223.164.202 with SMTP id h10csp34849wrb; Mon, 6 Nov 2017 02:01:34 -0800 (PST) X-Google-Smtp-Source: ABhQp+Qd+MFnefBqn5EhEjCOvMpY1df8LpPt0bs+SOW7VVgU9oOPH+Mcql4wWrP6vNO9maJWQZPV X-Received: by 10.159.255.5 with SMTP id bi5mr13622036plb.217.1509962493983; Mon, 06 Nov 2017 02:01:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509962493; cv=none; d=google.com; s=arc-20160816; b=zuMmIo4cPXaN6ATMuQ8zoktkcQ+hhfrG/k3SPuXm7a69jSDxDNLIZeHpOytOTVhDam /s/iGA4Ba7LvAWHCVbJoPVjgDDl6qFfpyiC1WcxrutyVX18L6+/ihXD1BRMI/ktf38Z0 6Yk/iuB99E/sM6rpJqkSTmQbh9ahT5mVZFkFCQx0YhAbG+t+q42huEMl2hsTDFLNI3kC 5cY8uNWTt3kbmpaolOxnMC3KhwSq9w8NrGfTcByyKdDSce3gvB7I/XIEidfJcYxKDSDL /R3q0DC7tLLfu3rZm4WSfW3ZFT5i7VGFwkBP25+/sJiJivQSzA2j5SyBgUAAH3SNqGfb yZhA== 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:references:to:from:subject:arc-authentication-results; bh=ns2a7pUz3k1dIYcK/qv2qt7dY8SPxmbTLaVwlOkp4Ns=; b=t0yTXVsBj/1BBBu3HK5HV+SjAiyP8yVSpAIXxRkV1+oVMumK4EDHnxjkWctCKpMviP 9zkjCmiK16v9xOI2PG6a56N/OCFiSKNPO5omHit5JrdKacRRDbQKxAy85kw9BKWKRdlr 0cVgD5cR2BFSs9qijCGKQf6yGTBVx486xBQI/Hss+sr6rBSuOwzzZOp8oK3lsCc09AMv EhqItXUU5a71Rnh53+tIBVcKalXyyYygy8ojdX4HLeHvGQfok0Y2qYm0m2k1GIKIyhc3 wv5PREbQ2xUkeNav0cF0Ok8s/aCcITJBbVEbtN3TNzv/8St2u7AbB7OYFQ256ppxoxDA Qymw== ARC-Authentication-Results: i=1; mx.google.com; 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 q15si6842240pgc.21.2017.11.06.02.01.20; Mon, 06 Nov 2017 02:01:33 -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; 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 S1753355AbdKFKAr (ORCPT + 99 others); Mon, 6 Nov 2017 05:00:47 -0500 Received: from aibo.runbox.com ([91.220.196.211]:43268 "EHLO aibo.runbox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752062AbdKFJrL (ORCPT ); Mon, 6 Nov 2017 04:47:11 -0500 Received: from [10.9.9.212] (helo=mailfront12.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1eBdzj-0000Gn-BP; Mon, 06 Nov 2017 10:47:03 +0100 Received: from 93.89.113.32.ip.vitnett.no ([93.89.113.32] helo=[10.5.202.90]) by mailfront12.runbox.com with esmtpsa (uid:646232 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1eBdzf-00045C-8Y; Mon, 06 Nov 2017 10:46:59 +0100 Subject: Re: [PATCH net-next 4/5] net: dsa: lan9303: Remove unnecessary parentheses From: Egil Hjelmeland To: Joe Perches , andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20171103105553.16859-1-privat@egil-hjelmeland.no> <20171103105553.16859-5-privat@egil-hjelmeland.no> <1509718281.15520.11.camel@perches.com> <32ae5cf5-ed19-106c-2625-b53074e00282@egil-hjelmeland.no> Message-ID: <6cd64977-ef25-72c8-1033-eb8aa0de30c9@egil-hjelmeland.no> Date: Mon, 6 Nov 2017 10:46:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <32ae5cf5-ed19-106c-2625-b53074e00282@egil-hjelmeland.no> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03. nov. 2017 15:35, Egil Hjelmeland wrote: > On 03. nov. 2017 15:11, Joe Perches wrote: >> On Fri, 2017-11-03 at 11:55 +0100, Egil Hjelmeland wrote: >>> Remove scripts/checkpatch.pl CHECKs by remove unnecessary parentheses >> [] >>> diff --git a/drivers/net/dsa/lan9303-core.c >>> b/drivers/net/dsa/lan9303-core.c >> [] >>> @@ -483,7 +483,7 @@ static int lan9303_detect_phy_setup(struct >>> lan9303 *chip) >>>           return reg; >>>       } >>> -    if ((reg != 0) && (reg != 0xffff)) >>> +    if (reg != 0 && reg != 0xffff) >>>           chip->phy_addr_sel_strap = 1; >>>       else >>>           chip->phy_addr_sel_strap = 0; >> >> phy_addr_sel_strap is currently bool. >> >> If this is to be changed, it should be set >> true or false. >> >> My preference would be: >> >>     chip->phy_addr_sel_strap = (reg != 0 && reg != 0xffff); >> >> But perhaps its bool type should be converted >> to int as this phy_addr_sel_strap is used as >> int several times. >> > > Hi Joe > > I had not noticed that phy_addr_sel_strap is bool. I agree that is > misleading. Your suggestion is perhaps a bit "magic", but on the other > hand the magic is explained well in the comment above. > > If there are no disagreements, I can do a v2 with that. > > And thanks for teaching me about "git grep"! > > Cheers > Egil > Hi I changed my mind slightly. I will just remove patch 4 in v2. In stead deal with phy_addr_sel_strap in a separate post. Because I think I want to rename phy_addr_sel_strap as well, plus some other simplification. So starting to creep out of the "linting" scope. Egil From 1583057190888401901@xxx Fri Nov 03 14:56:24 +0000 2017 X-GM-THRID: 1583042314863571680 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread