Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: marvell: Replace mdelay() with msleep() in m88e1116r_config_init()

m88e1116r_config_init() 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>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jia-Ju Bai and committed by
David S. Miller
0df125d0 6ae5cbc4

+1 -1
+1 -1
drivers/net/phy/marvell.c
··· 679 679 if (err < 0) 680 680 return err; 681 681 682 - mdelay(500); 682 + msleep(500); 683 683 684 684 err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE); 685 685 if (err < 0)