net: phy: remove dead code from phy_sanitize_settings
authorHeiner Kallweit <hkallweit1@gmail.com>
Tue, 16 Apr 2019 22:13:09 +0000 (00:13 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Apr 2019 23:30:55 +0000 (16:30 -0700)
phy_sanitize_settings() is called from phy_start_aneg() only, and only
if phydev->autoneg isn't set. Therefore the removed code does nothing.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c

index 5938c5acf3b3a9bd0e8905c9a5f4260946b88acc..984de987241cfb1a79cdf5ca63cd0de8f8926ca5 100644 (file)
@@ -214,10 +214,6 @@ static void phy_sanitize_settings(struct phy_device *phydev)
 {
        const struct phy_setting *setting;
 
-       /* Sanitize settings based on PHY capabilities */
-       if (linkmode_test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, phydev->supported))
-               phydev->autoneg = AUTONEG_DISABLE;
-
        setting = phy_find_valid(phydev->speed, phydev->duplex,
                                 phydev->supported);
        if (setting) {