net: phy: dp83867: Fix warning check for setting the internal delay
Subsystems (3)
PATCH 1/1 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 <[email protected]>
Signed-off-by Dan Murphy <[email protected]>
--- drivers/net/phy/dp83867.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/phy/dp83867.c +1 -1
@@ -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);
Signature · 1 line
1.9.1
Quoted 7 lines · Dan Murphy
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 <[email protected]>Signed-off-by Dan Murphy <[email protected]>
Acked-by Florian Fainelli <[email protected]>
Quoted 18 lines
--- drivers/net/phy/dp83867.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/phy/dp83867.c +1
-1@@ -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);
Signature · 1 line
Florian
From: Dan Murphy <[email protected]>
Date: Tue, 21 Jul 2015 12:06:45 -0500
Quoted 7 lines
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 <[email protected]>Signed-off-by Dan Murphy <[email protected]>
Applied, thanks.