Skip to contentSkip to conversation

bnx2x: fix logical op

PATCH In review Randy Dunlap 2 participants 2 messages Aug 7, 2008 – Aug 8, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bnx2x: fix logical op

From: Randy Dunlap <[email protected]>
cc: [email protected]

Fix dubious logical operation that was found by sparse:
linux-next-20080807/drivers/net/bnx2x_main.c:7205:27: warning: dubious: !x & y

---
 drivers/net/bnx2x_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/bnx2x_main.c +1 -1
@@ -7202,7 +7202,7 @@ static void __devinit bnx2x_link_setting
 	bp->link_params.req_flow_ctrl = (bp->port.link_config &
 					 PORT_FEATURE_FLOW_CONTROL_MASK);
 	if ((bp->link_params.req_flow_ctrl == FLOW_CTRL_AUTO) &&
-	    (!bp->port.supported & SUPPORTED_Autoneg))
+	    !(bp->port.supported & SUPPORTED_Autoneg))
 		bp->link_params.req_flow_ctrl = FLOW_CTRL_NONE;
 
 	BNX2X_DEV_INFO("req_line_speed %d  req_duplex %d  req_flow_ctrl 0x%x"
maintainer
#1 lore raw

From: Randy Dunlap <[email protected]>
Date: Thu, 7 Aug 2008 13:53:14 -0700

Quoted 4 lines

Fix dubious logical operation that was found by sparse:
linux-next-20080807/drivers/net/bnx2x_main.c:7205:27: warning: dubious: !x & y

Looks obviously correct to me, applied, thanks Randy!