All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Bhagyashri Dighole <digholebhagyashri@gmail.com>
Cc: Outreachy <outreachy-kernel@googlegroups.com>
Subject: Re: [Outreachy kernel] [PATCH] Staging: fbtft: Replace udelay to usleep_range
Date: Sun, 3 Mar 2019 09:34:30 +0100	[thread overview]
Message-ID: <20190303083430.GA30460@kroah.com> (raw)
In-Reply-To: <20190303082902.GA16698@bhagyashri-Lenovo-G570>

On Sun, Mar 03, 2019 at 01:59:02PM +0530, Bhagyashri Dighole wrote:
> Replace udelay to usleep_range function call with 10 microsecond range.
> Detected by checkpatch.pl "CHECK: usleep_range is preferred over udelay".
> 
> Signed-off-by: Bhagyashri Dighole <digholebhagyashri@gmail.com>
> ---
>  drivers/staging/fbtft/fb_agm1264k-fl.c |  2 +-
>  drivers/staging/fbtft/fb_ra8875.c      |  4 ++--
>  drivers/staging/fbtft/fb_tinylcd.c     |  2 +-
>  drivers/staging/fbtft/fb_upd161704.c   | 18 +++++++++---------
>  drivers/staging/fbtft/fb_watterott.c   |  4 ++--
>  5 files changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/staging/fbtft/fb_agm1264k-fl.c b/drivers/staging/fbtft/fb_agm1264k-fl.c
> index 8f27bd8..b2d19b1 100644
> --- a/drivers/staging/fbtft/fb_agm1264k-fl.c
> +++ b/drivers/staging/fbtft/fb_agm1264k-fl.c
> @@ -85,7 +85,7 @@ static void reset(struct fbtft_par *par)
>  	dev_dbg(par->info->device, "%s()\n", __func__);
>  
>  	gpiod_set_value(par->gpio.reset, 0);
> -	udelay(20);
> +	usleep_range(20, 30);

How do you know that 30 is an acceptable value here?

Making this kind of change is tricky if you do not have the hardware
involved, as you are changing the functionality of the driver.  Look up
why checkpatch is asking you to make this change, perhaps that reason is
not relevant for these devices?

I can't take this type of change without testing on the hardware itself,
sorry.

greg k-h


  reply	other threads:[~2019-03-03  8:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-03  8:29 [PATCH] Staging: fbtft: Replace udelay to usleep_range Bhagyashri Dighole
2019-03-03  8:34 ` Greg Kroah-Hartman [this message]
2019-03-03 14:16   ` [Outreachy kernel] " Bhagyashri Dighole
2019-03-03 14:27     ` Greg Kroah-Hartman
2019-03-03 15:36       ` Bhagyashri Dighole
2019-03-03 16:13         ` Julia Lawall

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=20190303083430.GA30460@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=digholebhagyashri@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.