[PATCH] net: phy: adin: fix a warning about msleep

Subsystems: analog devices inc adin driver, ethernet phy library, networking drivers, the rest

STALE2390d

2 messages, 2 authors, 2020-01-19 · open the first message on its own page

[PATCH] net: phy: adin: fix a warning about msleep

From: Dejin Zheng <hidden>
Date: 2020-01-17 15:10:53

found a warning by the following command:
./scripts/checkpatch.pl -f drivers/net/phy/adin.c

WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.rst
 #628: FILE: drivers/net/phy/adin.c:628:
+	msleep(10);

Signed-off-by: Dejin Zheng <redacted>
---
 drivers/net/phy/adin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/adin.c b/drivers/net/phy/adin.c
index cf5a391c93e6..6de25a2d3a05 100644
--- a/drivers/net/phy/adin.c
+++ b/drivers/net/phy/adin.c
@@ -625,7 +625,7 @@ static int adin_soft_reset(struct phy_device *phydev)
 	if (rc < 0)
 		return rc;
 
-	msleep(10);
+	msleep(20);
 
 	/* If we get a read error something may be wrong */
 	rc = phy_read_mmd(phydev, MDIO_MMD_VEND1,
-- 
2.17.1

Re: [PATCH] net: phy: adin: fix a warning about msleep

From: David Miller <davem@davemloft.net>
Date: 2020-01-19 15:07:05

From: Dejin Zheng <redacted>
Date: Fri, 17 Jan 2020 23:10:42 +0800
found a warning by the following command:
./scripts/checkpatch.pl -f drivers/net/phy/adin.c

WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.rst
 #628: FILE: drivers/net/phy/adin.c:628:
+	msleep(10);

Signed-off-by: Dejin Zheng <redacted>
Not critical, so applied to net-next.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help