Skip to contentSkip to conversation

e1000e: change logical negate to bitwise

PATCH In review Dan Carpenter 2 participants 2 messages May 22, 2010 – May 23, 2010

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

PATCH 1/1 e1000e: change logical negate to bitwise

The bitwise negate is intended here. With the logical negate the condition is always false.

drivers/net/e1000e/netdev.c +1 -1
index 24507f3..57a7e41 100644
@@ -2554,7 +2554,7 @@ static void e1000_init_manageability_pt(struct e1000_adapter *adapter)
 			mdef = er32(MDEF(i));
 
 			/* Ignore filters with anything other than IPMI ports */
-			if (mdef & !(E1000_MDEF_PORT_623 | E1000_MDEF_PORT_664))
+			if (mdef & ~(E1000_MDEF_PORT_623 | E1000_MDEF_PORT_664))
 				continue;
 
 			/* Enable this decision filter in MANC2H */
#1 lore raw
Quoted 10 lines · Dan Carpenter

The bitwise negate is intended here.  With the logical negate the condition is always false.

drivers/net/e1000e/netdev.c +0 -0
index 24507f3..57a7e41 100644

drivers/net/e1000e/netdev.c static void e1000_init_manageability_pt(struct e1000_adapter *adapter)

Quoted 9 lines
drivers/net/e1000e/netdev.c +1 -2
@@ -2554,7 +2554,7 @@ static void e1000_init_manageability_pt(struct e1000_adapter *adapter)
                        mdef = er32(MDEF(i));
 
                        /* Ignore filters with anything other than IPMI ports */
-                       if (mdef & !(E1000_MDEF_PORT_623 | E1000_MDEF_PORT_664))
+                       if (mdef & ~(E1000_MDEF_PORT_623 | E1000_MDEF_PORT_664))
                                continue;
 
                        /* Enable this decision filter in MANC2H */
--

Thanks Dan, I have added the patch to my queue.

Signature · 2 lines
Cheers,
Jeff