OSDN Git Service

net: ethernet: bnx2: Remove extra parentheses
authorVarsha Rao <rvarsha016@gmail.com>
Sun, 3 Jun 2018 11:49:04 +0000 (17:19 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Jun 2018 21:07:27 +0000 (17:07 -0400)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2.c

index 9ffc4a8..2306523 100644 (file)
@@ -3285,7 +3285,7 @@ next_rx:
                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 */