RE: [E1000-devel] [PATCH] Be explict with what we are !'ing inixgbe_sfp_config_module_task()

From: Brandeburg, Jesse
Date: Wed Apr 08 2009 - 13:52:25 EST


Tony Breeds wrote:
> GCC warns:
> drivers/net/ixgbe/ixgbe_main.c: In function
> 'ixgbe_sfp_config_module_task':
> drivers/net/ixgbe/ixgbe_main.c:3920: warning: suggest parentheses
> around operand of '!' or change '&' to '&&' or '!' to '~'
>
> Which I think is right. Bracket to remove ambiguity.
>
> Signed-off-by: Tony Breeds <tony@xxxxxxxxxxxxxxxxxx>
> ---
> drivers/net/ixgbe/ixgbe_main.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/ixgbe/ixgbe_main.c
> b/drivers/net/ixgbe/ixgbe_main.c
> index 9ef128a..9099634 100644
> --- a/drivers/net/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ixgbe/ixgbe_main.c
> @@ -3917,7 +3917,7 @@ static void ixgbe_sfp_config_module_task(struct
> work_struct *work) }
> hw->mac.ops.setup_sfp(hw);
>
> - if (!adapter->flags & IXGBE_FLAG_IN_SFP_LINK_TASK)
> + if (!(adapter->flags & IXGBE_FLAG_IN_SFP_LINK_TASK))
> /* This will also work for DA Twinax connections */
> schedule_work(&adapter->multispeed_fiber_task);
> adapter->flags &= ~IXGBE_FLAG_IN_SFP_MOD_TASK;

you're extremely correct, thanks!

Acked-by: Jesse Brandeburg <jesse.brandeburg@xxxxxxxxx>--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/