From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934325AbcLAUXG (ORCPT ); Thu, 1 Dec 2016 15:23:06 -0500 Received: from shards.monkeyblade.net ([184.105.139.130]:43606 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932845AbcLAUXE (ORCPT ); Thu, 1 Dec 2016 15:23:04 -0500 Date: Thu, 01 Dec 2016 15:23:03 -0500 (EST) Message-Id: <20161201.152303.425589678238707778.davem@davemloft.net> To: pavel@ucw.cz Cc: peppe.cavallaro@st.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] stmmac: simplify flag assignment From: David Miller In-Reply-To: <20161130114431.GB14296@amd> References: <20161124085506.GA25007@amd> <20161124.110416.198867271899443489.davem@davemloft.net> <20161130114431.GB14296@amd> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 01 Dec 2016 11:23:40 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pavel Machek Date: Wed, 30 Nov 2016 12:44:31 +0100 > > Simplify flag assignment. > > Signed-off-by: Pavel Machek > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > index ed20668..0b706a7 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > @@ -2771,12 +2771,8 @@ static netdev_features_t stmmac_fix_features(struct net_device *dev, > features &= ~NETIF_F_CSUM_MASK; > > /* Disable tso if asked by ethtool */ > - if ((priv->plat->tso_en) && (priv->dma_cap.tsoen)) { > - if (features & NETIF_F_TSO) > - priv->tso = true; > - else > - priv->tso = false; > - } > + if ((priv->plat->tso_en) && (priv->dma_cap.tsoen)) > + priv->tso = !!(features & NETIF_F_TSO); > Pavel, this really seems arbitrary. Whilst I really appreciate you're looking into this driver a bit because of some issues you are trying to resolve, I'd like to ask that you not start bombarding me with nit-pick cleanups here and there and instead concentrate on the real bug or issue. Thanks in advance.