From: Heiner Kallweit Date: Tue, 16 Apr 2019 22:13:09 +0000 (+0200) Subject: net: phy: remove dead code from phy_sanitize_settings X-Git-Tag: for-linus-20190516~56^2~153 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=4cf2d206ff40912e2352a639aac61f7d0332ccbb;p=linux-block.git net: phy: remove dead code from phy_sanitize_settings 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 5938c5acf3b3..984de987241c 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -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) {