All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Cc: outreachy-kernel@googlegroups.com, jerome.pouiller@silabs.com
Subject: Re: [PATCH] staging: wfx: Replace udelay() by usleep_range() in bh.c
Date: Mon, 5 Apr 2021 12:03:20 +0200	[thread overview]
Message-ID: <YGrgaPEwvRpFfdDc@kroah.com> (raw)
In-Reply-To: <20210405095213.19615-1-fmdefrancesco@gmail.com>

On Mon, Apr 05, 2021 at 11:52:13AM +0200, Fabio M. De Francesco wrote:
> Replace udelay() by usleep_range() in bh.c according to checkpatch
> message: "CHECK: usleep_range is preferred over udelay"
> 
> Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
> ---
>  drivers/staging/wfx/bh.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/wfx/bh.c b/drivers/staging/wfx/bh.c
> index ed53d0b45592..07ef6732973d 100644
> --- a/drivers/staging/wfx/bh.c
> +++ b/drivers/staging/wfx/bh.c
> @@ -315,7 +315,7 @@ void wfx_bh_poll_irq(struct wfx_dev *wdev)
>  			dev_err(wdev->dev, "time out while polling control register\n");
>  			return;
>  		}
> -		udelay(200);
> +		usleep_range(200, 300);

Do you know that this range is safe to use?  This type of change needs
to be tested on a device itself.

thanks,

greg k-h


  reply	other threads:[~2021-04-05 10:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05  9:52 [PATCH] staging: wfx: Replace udelay() by usleep_range() in bh.c Fabio M. De Francesco
2021-04-05 10:03 ` Greg KH [this message]
2021-04-05 10:15   ` FMDF
2021-04-05 10:17     ` Greg KH

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=YGrgaPEwvRpFfdDc@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=fmdefrancesco@gmail.com \
    --cc=jerome.pouiller@silabs.com \
    --cc=outreachy-kernel@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.