Message ID | Y+djy4R7Z/e5noRX@ubun2204.myguest.virtualbox.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1422274wrn; Sat, 11 Feb 2023 02:03:34 -0800 (PST) X-Google-Smtp-Source: AK7set/Wy70EhfdYrkWmihNj+tP10Zt0YZW0FXM2jrSe43X4grMde3KkHE9IFqlG9NGlsDdwaCPA X-Received: by 2002:a17:90a:1a43:b0:229:4731:994d with SMTP id 3-20020a17090a1a4300b002294731994dmr19216950pjl.4.1676109814261; Sat, 11 Feb 2023 02:03:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676109814; cv=none; d=google.com; s=arc-20160816; b=lkAjuuTBUO/MKg7lkJCWJpLH3NR5Q1996MnRXba463oOz7/Bmta+Btz5Z0ngTRZKs6 9KnO5ap4VNcO5jszhMiE4E3JaDH0B58BRPG/2pM9C6DwrExVfnSEKoX1R+/MX5ms2Ub4 sFkVNKxM7XXv8e+RPo2Wn/XRPlZKdStaKsRetbDIUKM/pWqZxB13Is75Bkswij8rJCaa 9rWxYtZTxBd+2TlengQhoRCYMIENWc2gu4C/YwchM9GJ0ZnuRQl8lpoI3TOk4h5JsH3G UWN2Yy7+SuaOcL/BLrMQI7Ke+CvzbBIRvDOYtO81W5PAQWNJnal7118FVzykenLIOrdV wD6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=Ch9LLrQFZjXqu3rghHgzVBdV/7JCxIoL+k7f+goaOE8=; b=Vbmqf9rrCxq1rzVDKfRwP9sy244HzSlqxJF1F/EMvkJM+yVigaOKFNCzUourPFug2K nM2i2RlvD5YMjvqyMHgoNBb6DecZ4JK5yzj/AwwqHjLnvyI64D6DkiLwR6DpIRaSBUpp NJLR9rWOvPCf1IxSVreICwdQuq0DFyFiYQ1ixTUCFWZ7NArCPHMLXNL1NJZ09PNWlqah cMb3bG8b/yJ0Ntrr9w4+txq5O9jHOzLp3n/4SOuf64OcEjO/9GEdZ9Pv6BtgVYpt1BD6 FY5WqXK7vjelD4fBopp9erIwcYUgyyGim248zuEGHaEukvFJly9jGCic6/Z0Bv6tYJRN DdiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=WfW8CTI2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l14-20020a17090a72ce00b002308551c433si6950769pjk.21.2023.02.11.02.03.22; Sat, 11 Feb 2023 02:03:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=WfW8CTI2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229901AbjBKJqX (ORCPT <rfc822;ybw1215001957@gmail.com> + 99 others); Sat, 11 Feb 2023 04:46:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229477AbjBKJqW (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 11 Feb 2023 04:46:22 -0500 Received: from msg-1.mailo.com (msg-1.mailo.com [213.182.54.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93D4D76AD for <linux-kernel@vger.kernel.org>; Sat, 11 Feb 2023 01:46:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1676108761; bh=Ydgu5g4WlyVn36Jz32lHZYcOHiMZLtAy7QIgF1AAXs0=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:MIME-Version: Content-Type; b=WfW8CTI2mD5aSk3n719ujDSox1IjJ/RCUVjx4PkizvmhFTmHevNphNQMH+aOK9WBu j85wmLxgwAntoZF21US6Q+drc/RJDxi6nlG+ImTtZvA7Se1taD0Oq043Cj6/MFnmsS ZiG+kf/07kpNges2apRpMw5G3OofAfb1NL0KD/ec= Received: by b-6.in.mailobj.net [192.168.90.16] with ESMTP via ip-206.mailobj.net [213.182.55.206] Sat, 11 Feb 2023 10:46:00 +0100 (CET) X-EA-Auth: 987LuaOKYgBLfh74yLd3cGsLvIMGcPDBhggO2IBqTNsNs0v/KybJmpHUNlZBAJSOmtIDgx64JjqKmLlNvw8RpgWQUpko0Io0 Date: Sat, 11 Feb 2023 15:15:47 +0530 From: Deepak R Varma <drv@mailo.com> To: Sunil Goutham <sgoutham@marvell.com>, Geetha sowjanya <gakula@marvell.com>, Subbaraya Sundeep <sbhatta@marvell.com>, hariprasad <hkelam@marvell.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Saurabh Singh Sengar <ssengar@microsoft.com>, Praveen Kumar <kumarpraveen@linux.microsoft.com>, Deepak R Varma <drv@mailo.com> Subject: [PATCH] octeontx2-pf: Remove repeating variable in test Message-ID: <Y+djy4R7Z/e5noRX@ubun2204.myguest.virtualbox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757528524269166801?= X-GMAIL-MSGID: =?utf-8?q?1757528524269166801?= |
Series |
octeontx2-pf: Remove repeating variable in test
|
|
Commit Message
Deepak R Varma
Feb. 11, 2023, 9:45 a.m. UTC
No need to & a variable with itself. Remove extra variable from the
expression. Change allows to realign code and improve readability.
Issue identified using doublebitand.cocci Coccinelle semantic patch.
Signed-off-by: Deepak R Varma <drv@mailo.com>
---
drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
Hi, > -----Original Message----- > From: Deepak R Varma <drv@mailo.com> > Sent: Saturday, February 11, 2023 3:16 PM > To: Sunil Kovvuri Goutham <sgoutham@marvell.com>; Geethasowjanya Akula > <gakula@marvell.com>; Subbaraya Sundeep Bhatta <sbhatta@marvell.com>; > Hariprasad Kelam <hkelam@marvell.com>; David S. Miller > <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub > Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; > netdev@vger.kernel.org; linux-kernel@vger.kernel.org > Cc: Saurabh Singh Sengar <ssengar@microsoft.com>; Praveen Kumar > <kumarpraveen@linux.microsoft.com>; Deepak R Varma <drv@mailo.com> > Subject: [EXT] [PATCH] octeontx2-pf: Remove repeating variable in test > > External Email > > ---------------------------------------------------------------------- > No need to & a variable with itself. Remove extra variable from the expression. > Change allows to realign code and improve readability. > Issue identified using doublebitand.cocci Coccinelle semantic patch. > > Signed-off-by: Deepak R Varma <drv@mailo.com> > --- > drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c > b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c > index 684cb8ec9f21..66a27ee5ca56 100644 > --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c > +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c > @@ -792,8 +792,7 @@ static int otx2_prepare_ipv6_flow(struct > ethtool_rx_flow_spec *fsp, > } > > /* NPC profile doesn't extract AH/ESP header fields */ > - if ((ah_esp_mask->spi & ah_esp_hdr->spi) || > - (ah_esp_mask->tclass & ah_esp_mask->tclass)) > + if ((ah_esp_mask->spi & ah_esp_hdr->spi) || ah_esp_mask- > >tclass) It is a typo. Below is the correct one: if ((ah_esp_mask->spi & ah_esp_hdr->spi) || (ah_esp_mask->tclass & ah_esp_hdr->tclass)) Thanks, Sundeep > return -EOPNOTSUPP; > > if (flow_type == AH_V6_FLOW) > -- > 2.34.1 > >
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c index 684cb8ec9f21..66a27ee5ca56 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c @@ -792,8 +792,7 @@ static int otx2_prepare_ipv6_flow(struct ethtool_rx_flow_spec *fsp, } /* NPC profile doesn't extract AH/ESP header fields */ - if ((ah_esp_mask->spi & ah_esp_hdr->spi) || - (ah_esp_mask->tclass & ah_esp_mask->tclass)) + if ((ah_esp_mask->spi & ah_esp_hdr->spi) || ah_esp_mask->tclass) return -EOPNOTSUPP; if (flow_type == AH_V6_FLOW)