Skip to content

Commit

Permalink
net: phy: remove dead code from phy_sanitize_settings
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiner Kallweit authored and David S. Miller committed Apr 18, 2019
1 parent 5e42574 commit 4cf2d20
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/net/phy/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4cf2d20

Please sign in to comment.