[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20111104.183738.2111276141585306607.davem@davemloft.net>
Date: Fri, 04 Nov 2011 18:37:38 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: dan.carpenter@...cle.com
Cc: fubar@...ibm.com, wpan@...hat.com, andy@...yhouse.net,
netdev@...r.kernel.org, kernel-janitors@...r.kernel.org,
bhutchings@...arflare.com
Subject: Re: [patch] bonding: comparing a u8 with -1 is always false
From: Dan Carpenter <dan.carpenter@...cle.com>
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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists