All of lore.kernel.org
 help / color / mirror / Atom feed
From: Varsha Rao <rvarsha016@gmail.com>
To: Rasesh Mody <rasesh.mody@cavium.com>,
	Harish Patil <harish.patil@cavium.com>,
	Dept-GELinuxNICDev@cavium.com,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Nicholas Mc Guire <der.herr@hofr.at>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Varsha Rao <rvarsha016@gmail.com>
Subject: [PATCH 1/2] net: ethernet: bnx2: Remove extra parentheses
Date: Sun,  3 Jun 2018 17:19:04 +0530	[thread overview]
Message-ID: <49739fc1c7f725223e88b5e80259ba40bcbaf8c5.1528025569.git.rvarsha016@gmail.com> (raw)
In-Reply-To: <cover.1528025568.git.rvarsha016@gmail.com>

The following coccinelle script removes extra parentheses to fix the
clang warning of extraneous parentheses.

@disable paren@
identifier i;
expression e;
statement s;
@@
if (
-(i == e)
+i == e
 )
s

Suggested-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
---
 drivers/net/ethernet/broadcom/bnx2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2.c b/drivers/net/ethernet/broadcom/bnx2.c
index 9ffc4a8c5fc7..2306523778d4 100644
--- a/drivers/net/ethernet/broadcom/bnx2.c
+++ b/drivers/net/ethernet/broadcom/bnx2.c
@@ -3285,7 +3285,7 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget)
 		sw_cons = BNX2_NEXT_RX_BD(sw_cons);
 		sw_prod = BNX2_NEXT_RX_BD(sw_prod);
 
-		if ((rx_pkt == budget))
+		if (rx_pkt == budget)
 			break;
 
 		/* Refresh hw_cons to see if there is new work */
-- 
2.17.0

  reply	other threads:[~2018-06-03 11:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-03 11:48 [PATCH 0/2] net: bnx2: Fix checkpatch and clang warnings Varsha Rao
2018-06-03 11:49 ` Varsha Rao [this message]
2018-06-03 11:49 ` [PATCH 2/2] net: ethernet: bnx2: Replace NULL comparison Varsha Rao
2018-06-04 21:07 ` [PATCH 0/2] net: bnx2: Fix checkpatch and clang warnings David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49739fc1c7f725223e88b5e80259ba40bcbaf8c5.1528025569.git.rvarsha016@gmail.com \
    --to=rvarsha016@gmail.com \
    --cc=Dept-GELinuxNICDev@cavium.com \
    --cc=davem@davemloft.net \
    --cc=der.herr@hofr.at \
    --cc=harish.patil@cavium.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=rasesh.mody@cavium.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.