From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jay Vosburgh <fubar@us.ibm.com>
Cc: Weiping Pan <wpan@redhat.com>,
Andy Gospodarek <andy@greyhouse.net>,
netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
kernel-janitors@vger.kernel.org,
Ben Hutchings <bhutchings@solarflare.com>
Subject: Re: [patch] bonding: comparing a u8 with -1 is always false
Date: Fri, 4 Nov 2011 23:53:51 +0300 [thread overview]
Message-ID: <20111104205351.GQ4682@mwanda> (raw)
In-Reply-To: <10444.1320436921@death>
[-- Attachment #1: Type: text/plain, Size: 766 bytes --]
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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2011-11-04 21:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-04 18:21 [patch] bonding: comparing a u8 with -1 is always false Dan Carpenter
2011-11-04 20:02 ` Jay Vosburgh
2011-11-04 20:35 ` Ben Hutchings
2011-11-04 20:53 ` Dan Carpenter [this message]
2011-11-04 22:37 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111104205351.GQ4682@mwanda \
--to=dan.carpenter@oracle.com \
--cc=andy@greyhouse.net \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=fubar@us.ibm.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=wpan@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).