Subject: Re: [patch] bonding: comparing a u8 with -1 is always false

From: Dan Carpenter <[email-masked]>
Date: Fri, 4 Nov 2011 23:53:51 +0300

On Fri, Nov 04, 2011 at 01:02:01PM -0700, Jay Vosburgh wrote:
> 
> 	Since you #define SPEED_UNKNOWN to -1 (below), how does this
> actually change anything?  Did you mean 0xffff (because struct
> ethtool_cmd's speed is a u16)?
> 

Sorry I could have explained this better in the changelog.  The
slave->speed is stored in a u32 and the -1 works fine as is.
Obviously, as you point out the define doesn't change anything.  I
just changed it so it would look symetric with DUPLEX_UNKNOWN.

But I think you missed that I defined #define DUPLEX_UNKNOWN 0xff.
Before it we used a -1 for both and that didn't work.

I can resend this with a note about the SPEED_UNKNOWN cleanup if
you'd like.  I'll do that tomorrow or Sunday.

regards,
dan carpenter