From: "Matt Carlson" <mcarlson@broadcom.com>
To: "Dan Carpenter" <dan.carpenter@oracle.com>
Cc: mcarlson@broadcom.com, netdev@vger.kernel.org
Subject: Re: tg3: Use *_UNKNOWN ethtool definitions
Date: Fri, 17 Feb 2012 16:54:45 -0800 [thread overview]
Message-ID: <20120218005445.GA14067@mcarlson.broadcom.com> (raw)
In-Reply-To: <20120217064830.GA14483@mwanda>
On Fri, Feb 17, 2012 at 09:48:30AM +0300, Dan Carpenter wrote:
> Hello Matt Carlson,
>
> The patch e740522e6d3a: "tg3: Use *_UNKNOWN ethtool definitions" from
> Feb 13, 2012, leads to the following Smatch warning:
> drivers/net/ethernet/broadcom/tg3.c:1822 tg3_adjust_link()
> error: tp->link_config.active_speed is never equal to -1 (wrong type 0 - 65535).
>
> - if ((phydev->link && tp->link_config.active_speed == SPEED_INVALID) ||
> - (!phydev->link && tp->link_config.active_speed != SPEED_INVALID) ||
> + if ((phydev->link && tp->link_config.active_speed == SPEED_UNKNOWN) ||
> + (!phydev->link && tp->link_config.active_speed != SPEED_UNKNOWN) ||
>
> Since tp->link_config.active_speed is an unsigned short, it never is
> equal to SPEED_UNKNOWN (-1).
>
> I introduced the SPEED_UNKNOWN so I feel bad that it's causing trouble
> now. :/
>
> Also this warning:
> drivers/net/ethernet/broadcom/tg3.c:3909 tg3_phy_copper_begin(14)
> error: tp->link_config.speed is never equal to -1 (wrong type 0 - 65535).
Do you have any problems with changing SPEED_UNKNOWN from -1 to 0xffff?
next prev parent reply other threads:[~2012-02-18 0:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-17 6:48 tg3: Use *_UNKNOWN ethtool definitions Dan Carpenter
2012-02-18 0:54 ` Matt Carlson [this message]
2012-02-18 1:03 ` Ben Hutchings
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=20120218005445.GA14067@mcarlson.broadcom.com \
--to=mcarlson@broadcom.com \
--cc=dan.carpenter@oracle.com \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.