All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Anchal Jain <anchalj109@gmail.com>
Cc: outreachy-kernel@googlegroups.com, lidza.louina@gmail.com
Subject: Re: [PATCH v2] staging: dgnc: dgnc_cls.c: usleep_range is preferred over udelay
Date: Tue, 13 Sep 2016 14:42:10 +0200	[thread overview]
Message-ID: <20160913124210.GC19911@kroah.com> (raw)
In-Reply-To: <20160913075754.GA7012@life-desktop>

On Tue, Sep 13, 2016 at 01:28:39PM +0530, Anchal Jain wrote:
> According to Documentation/timers/timers-howto.txt"
> udelay() is only called once from a place where sleeping is allowed.
> We can replace it with a call to usleep_range()
> with a reasonable upper limit
> 
> 
> Signed-off-by: Anchal Jain <anchalj109@gmail.com>
> ---
> 
> Change in v2:
> 	-By mistake another patch was mixed so, Remove that patch file
>  drivers/staging/dgnc/dgnc_cls.c      |  6 +++---
>  drivers/staging/wilc1000/linux_mon.c | 11 +++++++++++
>  2 files changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c
> index 4e1e0dc6..1b07255 100644
> --- a/drivers/staging/dgnc/dgnc_cls.c
> +++ b/drivers/staging/dgnc/dgnc_cls.c
> @@ -410,7 +410,7 @@ static void cls_assert_modem_signals(struct channel_t *ch)
>  	writeb(out, &ch->ch_cls_uart->mcr);
>  
>  	/* Give time for the UART to actually drop the signals */
> -	udelay(10);
> +	usleep_range(10, 20);
>  }
>  
>  static void cls_copy_data_from_queue_to_uart(struct channel_t *ch)

As others pointed out, this isn't ok to change, sorry.

greg k-h


      reply	other threads:[~2016-09-13 12:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-13  7:58 [PATCH v2] staging: dgnc: dgnc_cls.c: usleep_range is preferred over udelay Anchal Jain
2016-09-13 12:42 ` Greg KH [this message]

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=20160913124210.GC19911@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=anchalj109@gmail.com \
    --cc=lidza.louina@gmail.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.