bnx2x: fix logical op
Subsystems (2)
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
Signed-off-by Randy Dunlap <[email protected]>
--- 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"
David Miller
maintainerFrom: 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 & ySigned-off-by Randy Dunlap <[email protected]>
Looks obviously correct to me, applied, thanks Randy!