From a6e11f6bbd29a92d1357c2f3033a70fb1b767432 Mon Sep 17 00:00:00 2001 From: Heiner Kallweit Date: Tue, 5 Feb 2019 20:41:37 +0100 Subject: net: phy: improve genphy_c45_read_link Let's make genphy_c45_read_link behave the same as genphy_update_link and set phydev->link in the function directly. This allows to simplify the callers. In addition don't check further devices once we detect that at least one device reports link as down. v2: - remove an unused variable Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller --- drivers/net/phy/marvell10g.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/net/phy/marvell10g.c') diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c index 5531f9cabc63..296a537cdfcb 100644 --- a/drivers/net/phy/marvell10g.c +++ b/drivers/net/phy/marvell10g.c @@ -457,8 +457,6 @@ static int mv3310_read_status(struct phy_device *phydev) if (val < 0) return val; - phydev->link = val > 0 ? 1 : 0; - val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_STAT1); if (val < 0) return val; -- cgit v1.2.3