Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59BC323DB for ; Sun, 29 Oct 2023 16:53:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=inria.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=inria.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=inria.fr header.i=@inria.fr header.b="SwZw43Ek" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=sthEF1zx8iK8BApY4FQJyD4EAH+X6HwuaYhwtlIksZg=; b=SwZw43EkuTcJAptMCubDE5IVQAEwAz5dY3+pjMVqnH1nMriwLuB78Zmf vzdxU+Xi739U4vPh8zGqm39grQmOvkQokbj/MJ1fixf5o885SL3Lr2hDn LoxFbx8RTECfSio1mjTu6GnV/SrsGZas/HT/ieOac+CkdhqIYJuxbbY5E w=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.03,261,1694728800"; d="scan'208";a="70056043" Received: from 231.85.89.92.rev.sfr.net (HELO hadrien) ([92.89.85.231]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2023 17:53:53 +0100 Date: Sun, 29 Oct 2023 17:53:52 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Dorine Tipo cc: outreachy@lists.linux.dev, gregkh@linuxfoundation.org Subject: Re: [PATCH] staging: octeon: remove unnecessary parentheses In-Reply-To: <20231029162453.7437-1-dorine.a.tipo@gmail.com> Message-ID: References: <20231029162453.7437-1-dorine.a.tipo@gmail.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) Precedence: bulk X-Mailing-List: outreachy@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII This patch is working on the same code as the previous one, but there is no indication that it is anything other than the first version. On Sun, 29 Oct 2023, Dorine Tipo wrote: > This patch addresses the unnecessary issue reported by checkpatch. > The subject line has been revised to be more concise and less detailed, > as suggested in the patch feedback. > > - Remove unnecessary parentheses around 'interface < 2'. > > Signed-off-by: Dorine Tipo > > --- > Removing the parentheses around interface < 2 improves readability without > changing the order of evaluation of the logic because the < operator has > a higher precedence than the && operator. This is quite backwards. Above the line you should provide all of the information that will be useful to people in the future, and thus should be recorded in the git tree. Below the line, you should indicate what has changed since the previous version. This should contain the entire history of the evolution of the patch, as illustrated in the Revising your patches section of the furst patch tutorial. julia > drivers/staging/octeon/ethernet.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c > index 8e1f4b987a25..349308edbc9e 100644 > --- a/drivers/staging/octeon/ethernet.c > +++ b/drivers/staging/octeon/ethernet.c > @@ -248,7 +248,7 @@ static int cvm_oct_common_change_mtu(struct net_device *dev, int new_mtu) > > dev->mtu = new_mtu; > > - if ((interface < 2) && > + if (interface < 2 && > (cvmx_helper_interface_get_mode(interface) != > CVMX_HELPER_INTERFACE_MODE_SPI)) { > int index = INDEX(priv->port); > @@ -294,7 +294,7 @@ static void cvm_oct_common_set_multicast_list(struct net_device *dev) > struct octeon_ethernet *priv = netdev_priv(dev); > int interface = INTERFACE(priv->port); > > - if ((interface < 2) && > + if (interface < 2 && > (cvmx_helper_interface_get_mode(interface) != > CVMX_HELPER_INTERFACE_MODE_SPI)) { > union cvmx_gmxx_rxx_adr_ctl control; > @@ -346,7 +346,7 @@ static int cvm_oct_set_mac_filter(struct net_device *dev) > union cvmx_gmxx_prtx_cfg gmx_cfg; > int interface = INTERFACE(priv->port); > > - if ((interface < 2) && > + if (interface < 2 && > (cvmx_helper_interface_get_mode(interface) != > CVMX_HELPER_INTERFACE_MODE_SPI)) { > int i; > -- > 2.25.1 > >