Skip to content

Commit

Permalink
net: phy: marvell: Replace mdelay() with msleep() in m88e1116r_config…
Browse files Browse the repository at this point in the history
…_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>
  • Loading branch information
Jia-Ju Bai authored and David S. Miller committed Jul 27, 2018
1 parent 6ae5cbc commit 0df125d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/phy/marvell.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ static int m88e1116r_config_init(struct phy_device *phydev)
if (err < 0)
return err;

mdelay(500);
msleep(500);

err = marvell_set_page(phydev, MII_MARVELL_COPPER_PAGE);
if (err < 0)
Expand Down

0 comments on commit 0df125d

Please sign in to comment.