提交 4f48ed32 编写于 作者: A Andrew Lunn 提交者: David S. Miller

net: phy: marvell: Checkpatch - assignments and comparisons

Avoid multiple assignments
Comparisons should place the constant on the right side of the test
Signed-off-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e69d9ed4
...@@ -1101,7 +1101,7 @@ static int marvell_read_status_page(struct phy_device *phydev, int page) ...@@ -1101,7 +1101,7 @@ static int marvell_read_status_page(struct phy_device *phydev, int page)
if (err) if (err)
return err; return err;
if (AUTONEG_ENABLE == phydev->autoneg) { if (phydev->autoneg == AUTONEG_ENABLE) {
status = phy_read(phydev, MII_M1011_PHY_STATUS); status = phy_read(phydev, MII_M1011_PHY_STATUS);
if (status < 0) if (status < 0)
return status; return status;
...@@ -1126,7 +1126,8 @@ static int marvell_read_status_page(struct phy_device *phydev, int page) ...@@ -1126,7 +1126,8 @@ static int marvell_read_status_page(struct phy_device *phydev, int page)
phydev->duplex = DUPLEX_HALF; phydev->duplex = DUPLEX_HALF;
status = status & MII_M1011_PHY_STATUS_SPD_MASK; status = status & MII_M1011_PHY_STATUS_SPD_MASK;
phydev->pause = phydev->asym_pause = 0; phydev->pause = 0;
phydev->asym_pause = 0;
switch (status) { switch (status) {
case MII_M1011_PHY_STATUS_1000: case MII_M1011_PHY_STATUS_1000:
...@@ -1185,7 +1186,8 @@ static int marvell_read_status_page(struct phy_device *phydev, int page) ...@@ -1185,7 +1186,8 @@ static int marvell_read_status_page(struct phy_device *phydev, int page)
else else
phydev->speed = SPEED_10; phydev->speed = SPEED_10;
phydev->pause = phydev->asym_pause = 0; phydev->pause = 0;
phydev->asym_pause = 0;
phydev->lp_advertising = 0; phydev->lp_advertising = 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册