From: Dan Murphy Date: Tue, 21 Jul 2015 17:06:45 +0000 (-0500) Subject: net: phy: dp83867: Fix warning check for setting the internal delay X-Git-Tag: v4.2-rc4~25^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a46fa260f6f5e8f80a725b28e4aee5a04d1bd79e;p=platform%2Fkernel%2Flinux-exynos.git net: phy: dp83867: Fix warning check for setting the internal delay Fix warning: logical ‘or’ of collectively exhaustive tests is always true Change the internal delay check from an 'or' condition to an 'and' condition. Reported-by: David Binderman Signed-off-by: Dan Murphy Acked-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index c7a12e2e07b7..8a3bf5469892 100644 --- a/drivers/net/phy/dp83867.c +++ b/drivers/net/phy/dp83867.c @@ -164,7 +164,7 @@ static int dp83867_config_init(struct phy_device *phydev) return ret; } - if ((phydev->interface >= PHY_INTERFACE_MODE_RGMII_ID) || + if ((phydev->interface >= PHY_INTERFACE_MODE_RGMII_ID) && (phydev->interface <= PHY_INTERFACE_MODE_RGMII_RXID)) { val = phy_read_mmd_indirect(phydev, DP83867_RGMIICTL, DP83867_DEVADDR, phydev->addr);