From: Andrew Lunn <andrew@lunn.ch>
Date: Wed, 17 May 2017 03:26:01 +0200
Subject: net: phy: marvell: Checkpatch - assignments and comparisons
Patch-mainline: v4.13-rc1
Git-commit: 4f48ed32fb62fc1546306c1488e259c0c4f4f462
References: bsc#1119113 FATE#326472
Avoid multiple assignments
Comparisons should place the constant on the right side of the test
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
drivers/net/phy/marvell.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -1109,7 +1109,7 @@ static int marvell_read_status_page(stru
if (err)
return err;
- if (AUTONEG_ENABLE == phydev->autoneg) {
+ if (phydev->autoneg == AUTONEG_ENABLE) {
status = phy_read(phydev, MII_M1011_PHY_STATUS);
if (status < 0)
return status;
@@ -1132,7 +1132,8 @@ static int marvell_read_status_page(stru
phydev->duplex = DUPLEX_HALF;
status = status & MII_M1011_PHY_STATUS_SPD_MASK;
- phydev->pause = phydev->asym_pause = 0;
+ phydev->pause = 0;
+ phydev->asym_pause = 0;
switch (status) {
case MII_M1011_PHY_STATUS_1000:
@@ -1191,7 +1192,8 @@ static int marvell_read_status_page(stru
else
phydev->speed = SPEED_10;
- phydev->pause = phydev->asym_pause = 0;
+ phydev->pause = 0;
+ phydev->asym_pause = 0;
phydev->lp_advertising = 0;
}