aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@gmail.com>2018-07-27 16:07:38 +0800
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2018-08-24 08:52:35 -0700
commit69a64658de502c8ca383fe2c5a5208f00b5844cd (patch)
tree8019a3061aa13e6a5d2e8fccd81b44788e8813c4 /drivers/net
parentigb: Replace GFP_ATOMIC with GFP_KERNEL in igb_sw_init() (diff)
downloadlinux-dev-69a64658de502c8ca383fe2c5a5208f00b5844cd.tar.xz
linux-dev-69a64658de502c8ca383fe2c5a5208f00b5844cd.zip
igb: Replace mdelay() with msleep() in igb_integrated_phy_loopback()
igb_integrated_phy_loopback() is never called in atomic context. It calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/intel/igb/igb_ethtool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index f92f7918112d..5acf3b743876 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -1649,7 +1649,7 @@ static int igb_integrated_phy_loopback(struct igb_adapter *adapter)
if (hw->phy.type == e1000_phy_m88)
igb_phy_disable_receiver(adapter);
- mdelay(500);
+ msleep(500);
return 0;
}