Netdev List
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 2/2] net: ethernet: ave: Replace udelay with usleep_range
Date: Thu, 8 Jan 2026 09:05:14 +0000	[thread overview]
Message-ID: <20260108090514.375a23fb@pumpkin> (raw)
In-Reply-To: <20260108064641.2593749-2-hayashi.kunihiko@socionext.com>

On Thu,  8 Jan 2026 15:46:41 +0900
Kunihiko Hayashi <hayashi.kunihiko@socionext.com> wrote:

> Replace udelay() with usleep_range() as notified by checkpatch.pl.

Nak.
Look at the code...

> 
>     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);


  reply	other threads:[~2026-01-08 10:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-08  6:46 [PATCH net 1/2] net: ethernet: ave: Remove unnecessary 'out of memory' message Kunihiko Hayashi
2026-01-08  6:46 ` [PATCH net 2/2] net: ethernet: ave: Replace udelay with usleep_range Kunihiko Hayashi
2026-01-08  9:05   ` David Laight [this message]
2026-01-09  0:59     ` Kunihiko Hayashi
2026-01-08 18:32 ` [PATCH net 1/2] net: ethernet: ave: Remove unnecessary 'out of memory' message Andrew Lunn
2026-01-09  0:27   ` Kunihiko Hayashi
2026-01-09  1:20     ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260108090514.375a23fb@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hayashi.kunihiko@socionext.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox