sh_eth: remove useless serialization in sh_eth_get_link_ksettings()
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Wed, 4 Jul 2018 08:14:47 +0000 (11:14 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 7 Jul 2018 01:44:09 +0000 (10:44 +0900)
phy_ethtool_ksettings_get() call does not modify device state or device
driver state, hence there is no need to utilize a driver specific
spinlock.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Reviewed-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c

index 50ff188..152edd1 100644 (file)
@@ -2043,15 +2043,10 @@ static int sh_eth_phy_start(struct net_device *ndev)
 static int sh_eth_get_link_ksettings(struct net_device *ndev,
                                     struct ethtool_link_ksettings *cmd)
 {
-       struct sh_eth_private *mdp = netdev_priv(ndev);
-       unsigned long flags;
-
        if (!ndev->phydev)
                return -ENODEV;
 
-       spin_lock_irqsave(&mdp->lock, flags);
        phy_ethtool_ksettings_get(ndev->phydev, cmd);
-       spin_unlock_irqrestore(&mdp->lock, flags);
 
        return 0;
 }