[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55AD2FC6.60508@gmail.com>
Date: Mon, 20 Jul 2015 10:28:38 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: David Binderman <dcb314@...mail.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>, dmurphy@...com
Subject: Re: drivers/net/phy/dp83867.c:167: possible bad if ?
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
--
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