All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Ioannis Valasakis <code@wizofe.uk>
Cc: outreachy-kernel@googlegroups.com, gregkh@linuxfoundation.org,
	 aditya.shankar@microchip.com, ganesh.krishna@microchip.com
Subject: Re: [Outreachy kernel] [PATCH 1/3] staging: wilc1000: replace udelay with usleep_range
Date: Wed, 10 Oct 2018 16:54:38 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1810101654100.3396@hadrien> (raw)
In-Reply-To: <6eca799b032fdd5f674f55087c926b1957e22e5c.1539182155.git.code@wizofe.uk>



On Wed, 10 Oct 2018, Ioannis Valasakis wrote:

> Fix warning and replace a udelay inside a non-atomic context and
> it can be safely replace by a usleep_range(t, t + delta), where delta is
> 20% of t, as that is between 10 and 20 microseconds.
> Reported by checkpatch.

It looks like your delta is 5%?

julia

>
> Signed-off-by: Ioannis Valasakis <code@wizofe.uk>
> ---
>  drivers/staging/wilc1000/wilc_wlan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
> index 8b184aa30d25..661c594b0a3c 100644
> --- a/drivers/staging/wilc1000/wilc_wlan.c
> +++ b/drivers/staging/wilc1000/wilc_wlan.c
> @@ -436,7 +436,7 @@ void chip_wakeup(struct wilc *wilc)
>  		} while (wilc_get_chipid(wilc, true) == 0);
>  	} else if ((wilc->io_type & 0x1) == HIF_SDIO) {
>  		wilc->hif_func->hif_write_reg(wilc, 0xfa, 1);
> -		udelay(200);
> +		usleep_range(200, 210);
>  		wilc->hif_func->hif_read_reg(wilc, 0xf0, &reg);
>  		do {
>  			wilc->hif_func->hif_write_reg(wilc, 0xf0,
> --
> 2.19.1
>
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/6eca799b032fdd5f674f55087c926b1957e22e5c.1539182155.git.code%40wizofe.uk.
> For more options, visit https://groups.google.com/d/optout.
>


  reply	other threads:[~2018-10-10 14:54 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 14:46 [PATCH 0/3] staging: wilc1000 Ioannis Valasakis
2018-10-10 14:47 ` [PATCH 1/3] staging: wilc1000: replace udelay with usleep_range Ioannis Valasakis
2018-10-10 14:54   ` Julia Lawall [this message]
2018-10-10 14:59     ` [Outreachy kernel] " Ioannis Valasakis
2018-10-10 15:02       ` Julia Lawall
2018-10-10 15:13         ` Ioannis Valasakis
2018-10-10 18:33   ` Greg KH
2018-10-10 14:47 ` [PATCH 2/3] staging: wilc1000: prefer 'help' in KConfig Ioannis Valasakis
2018-10-10 14:48 ` [PATCH 3/3] staging: wilc1000: Change struct members from bool to u8 Ioannis Valasakis
2018-10-10 14:58   ` [Outreachy kernel] " Julia Lawall
2018-10-10 18:10   ` Himanshu Jha
2018-10-10 18:32   ` Greg KH
2018-10-11  8:52     ` Ioannis Valasakis

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=alpine.DEB.2.20.1810101654100.3396@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=aditya.shankar@microchip.com \
    --cc=code@wizofe.uk \
    --cc=ganesh.krishna@microchip.com \
    --cc=gregkh@linuxfoundation.org \
    --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.