Skip to content

Commit 69a6465

Browse files
XidianGeneralJeff Kirsher
authored andcommitted
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>
1 parent 1513562 commit 69a6465

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/intel/igb/igb_ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,7 @@ static int igb_integrated_phy_loopback(struct igb_adapter *adapter)
16491649
if (hw->phy.type == e1000_phy_m88)
16501650
igb_phy_disable_receiver(adapter);
16511651

1652-
mdelay(500);
1652+
msleep(500);
16531653
return 0;
16541654
}
16551655

0 commit comments

Comments
 (0)