Thread (7 messages) flat view 7 messages, 3 authors, 2026-01-09

Re: [PATCH net 2/2] net: ethernet: ave: Replace udelay with usleep_range

From: David Laight <hidden>
Date: 2026-01-08 10:53:44
Also in: lkml

On Thu,  8 Jan 2026 15:46:41 +0900
Kunihiko Hayashi [off-list ref] wrote:
Replace udelay() with usleep_range() as notified by checkpatch.pl.
Nak.
Look at the code...
quoted hunk ↗ jump to hunk
    CHECK: usleep_range is preferred over udelay; see function description
    of usleep_range() and udelay().
    #906: FILE: drivers/net/ethernet/socionext/sni_ave.c:906:
    +       udelay(50);

Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
---
 drivers/net/ethernet/socionext/sni_ave.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/socionext/sni_ave.c b/drivers/net/ethernet/socionext/sni_ave.c
index 4700998c4837..a3735d81a862 100644
--- a/drivers/net/ethernet/socionext/sni_ave.c
+++ b/drivers/net/ethernet/socionext/sni_ave.c
@@ -903,11 +903,11 @@ static void ave_rxfifo_reset(struct net_device *ndev)
 
 	/* assert reset */
 	writel(AVE_GRR_RXFFR, priv->base + AVE_GRR);
-	udelay(50);
+	usleep_range(50, 100);
 
 	/* negate reset */
 	writel(0, priv->base + AVE_GRR);
-	udelay(20);
+	usleep_range(20, 40);
 
 	/* negate interrupt status */
 	writel(AVE_GI_RXOVF, priv->base + AVE_GISR);
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help