netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] e1000e: change logical negate to bitwise
@ 2010-05-22 19:45 Dan Carpenter
  2010-05-23  1:01 ` Jeff Kirsher
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-05-22 19:45 UTC (permalink / raw)
  To: Jeff Kirsher
  Cc: Jesse Brandeburg, Bruce Allan, Alex Duyck, PJ Waskiewicz,
	John Ronciak, David S. Miller, e1000-devel, netdev,
	kernel-janitors

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

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 24507f3..57a7e41 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -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 */

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] e1000e: change logical negate to bitwise
  2010-05-22 19:45 [patch] e1000e: change logical negate to bitwise Dan Carpenter
@ 2010-05-23  1:01 ` Jeff Kirsher
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Kirsher @ 2010-05-23  1:01 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Jesse Brandeburg, Bruce Allan, Alex Duyck, PJ Waskiewicz,
	John Ronciak, David S. Miller, e1000-devel, netdev,
	kernel-janitors

On Sat, May 22, 2010 at 12:45, Dan Carpenter <error27@gmail.com> wrote:
> The bitwise negate is intended here.  With the logical negate the
> condition is always false.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
> index 24507f3..57a7e41 100644
> --- a/drivers/net/e1000e/netdev.c
> +++ b/drivers/net/e1000e/netdev.c
> @@ -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.

-- 
Cheers,
Jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-05-23  1:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-22 19:45 [patch] e1000e: change logical negate to bitwise Dan Carpenter
2010-05-23  1:01 ` Jeff Kirsher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).