Received: by 10.223.164.221 with SMTP id h29csp190322wrb; Fri, 3 Nov 2017 07:37:46 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RooYyMeBr7wXhwvQ42VF5J9j6XuOq6Trj40fJMW6hKnNYy1S+PlGvOmX0LDF/dg3M7xzf8 X-Received: by 10.101.88.203 with SMTP id e11mr7423099pgu.173.1509719866568; Fri, 03 Nov 2017 07:37:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509719866; cv=none; d=google.com; s=arc-20160816; b=BZ8MX5mBduUiSVkRfMsZUWkXJn59se2WN0aVhxn3vBHgMyQ9bRCW/B9NHGLWMSjilB Nq7OAu7xab7P20ts/EbKhwbQwnOT5maBhYK+cqYsweaaB55U5b0A7rVVgYdfLJVDtTIg DoZTelYv3H+V2aUgQ/aExLczdhgC97B52TgHHLAAkA6SEk3bwpE7y5ZNdAjWVsEKC/Nw BWaHgN36zRU4JoZQWMiet7BjioHc7/rDOUSOIBagAr5wJTrGGN3Vlz4Ky4ys9KaM6JzE TXYBkibREjrurHGqRS0vnbma1KRpBzqacZmpUKHAcUcdm44zo4CGzTnI4WKhs3g4saYd WjDw== 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:to:subject:arc-authentication-results; bh=bjABBm72t0CC3YYTSbjxfyrJvTmo5+oUNxrHhglkRsk=; b=V24i9tAW5uJLVseRa8icR2rALVy2Xka2/v0qXO0IJ42VWGq9EIpiM3qoWv3a5qXWd2 XWDiMHqGkQhlFvJ7bCcZSNCFOpq9iK7i1xsVzk4oNNYhXyZ6IhPUx2bwa2mxPd4SYnIv Rj2nfTdXj1FhvnDQUsTq9c127nG5XHH9nUumijTLhUV9bwhLmNyjcXhAWtTsx2yPDil7 P0ShZbT+NnaG64G295uAGgmFZVdn3jgpO71gS5eFFhyW5MAAZxXWZsNhzjTXUyfq3F8l BfKZwHZCrmImQj9jT5ozoN5BqfPRX7+uScGNqatYkn6HAcuKc82JAQ1RuNiX5hlywQEQ h9iw== 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 a8si6157475pgu.368.2017.11.03.07.37.33; Fri, 03 Nov 2017 07:37:46 -0700 (PDT) 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 S1754539AbdKCOgG (ORCPT + 95 others); Fri, 3 Nov 2017 10:36:06 -0400 Received: from aibo.runbox.com ([91.220.196.211]:38326 "EHLO aibo.runbox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750805AbdKCOgF (ORCPT ); Fri, 3 Nov 2017 10:36:05 -0400 Received: from [10.9.9.210] (helo=mailfront10.runbox.com) by mailtransmit03.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1eAd4j-0000ui-2p; Fri, 03 Nov 2017 15:36:01 +0100 Received: from 93.89.113.32.ip.vitnett.no ([93.89.113.32] helo=[10.5.202.90]) by mailfront10.runbox.com with esmtpsa (uid:646232 ) (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.82) id 1eAd4P-0002M4-Rm; Fri, 03 Nov 2017 15:35:41 +0100 Subject: Re: [PATCH net-next 4/5] net: dsa: lan9303: Remove unnecessary parentheses 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> From: Egil Hjelmeland Message-ID: <32ae5cf5-ed19-106c-2625-b53074e00282@egil-hjelmeland.no> Date: Fri, 3 Nov 2017 15:35:41 +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: <1509718281.15520.11.camel@perches.com> Content-Type: text/plain; charset=utf-8; format=flowed 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 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 From 1583054457516942080@xxx Fri Nov 03 14:12:57 +0000 2017 X-GM-THRID: 1583042314863571680 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread