From: Florian Fainelli <f.fainelli@gmail.com>
To: David Binderman <dcb314@hotmail.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
dmurphy@ti.com
Subject: Re: drivers/net/phy/dp83867.c:167: possible bad if ?
Date: Mon, 20 Jul 2015 10:28:38 -0700 [thread overview]
Message-ID: <55AD2FC6.60508@gmail.com> (raw)
In-Reply-To: <DUB128-W6216BE4A8E21E94EEB06DE9C850@phx.gbl>
Adding Dan,
On 20/07/15 05:37, David Binderman wrote:
> Hello there,
>
> drivers/net/phy/dp83867.c:167:57: warning: logical ‘or’ of collectively exhaustive tests is always true [-Wlogical-op]
>
> Source code is
>
> if ((phydev->interface>= PHY_INTERFACE_MODE_RGMII_ID) ||
> (phydev->interface <= PHY_INTERFACE_MODE_RGMII_RXID)) {
>
> Maybe
>
> if ((phydev->interface>= PHY_INTERFACE_MODE_RGMII_ID) &&
> (phydev->interface <= PHY_INTERFACE_MODE_RGMII_RXID)) {
Sounds like the former is the intended comparison that will make sure
that phydev->interface is between MODE_RGMII_ID and MODE_RGMII_RXID, and
not below or after.
--
Florian
next prev parent reply other threads:[~2015-07-20 17:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-20 12:37 drivers/net/phy/dp83867.c:167: possible bad if ? David Binderman
2015-07-20 17:28 ` Florian Fainelli [this message]
2015-07-20 17:37 ` Dan Murphy
2015-07-20 17:40 ` Florian Fainelli
2015-07-20 17:52 ` Dan Murphy
2015-07-20 18:00 ` David Binderman
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=55AD2FC6.60508@gmail.com \
--to=f.fainelli@gmail.com \
--cc=dcb314@hotmail.com \
--cc=dmurphy@ti.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.