Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69a64658 authored by Jia-Ju Bai's avatar Jia-Ju Bai Committed by Jeff Kirsher
Browse files

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: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 15135627
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}