[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20111104205351.GQ4682@mwanda>
Date: Fri, 4 Nov 2011 23:53:51 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Jay Vosburgh <fubar@...ibm.com>
Cc: Weiping Pan <wpan@...hat.com>,
Andy Gospodarek <andy@...yhouse.net>, netdev@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>,
kernel-janitors@...r.kernel.org,
Ben Hutchings <bhutchings@...arflare.com>
Subject: Re: [patch] bonding: comparing a u8 with -1 is always false
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
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists