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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
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.

That won't be necessary, I'll apply your patch as-is.

Thanks Dan.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux