lkml.org 
[lkml]   [2018]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 01/15] staging: fbtft: Changes udelay(n) to usleep_range(n, n + x). - Style
On Tue, Aug 07, 2018 at 09:28:00PM -0300, Leonardo Brás wrote:
> Changes some udelay(n) for n >= 10 to usleep_range(n, n+x) as recommended by checkpatch.pl.

Please properly wrap your changelog lines at 72 columns or close to
that.

>
> Signed-off-by: Leonardo Brás <leobras.c@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 | 19 +++++++++----------
> drivers/staging/fbtft/fb_watterott.c | 4 ++--
> 5 files changed, 15 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/staging/fbtft/fb_agm1264k-fl.c b/drivers/staging/fbtft/fb_agm1264k-fl.c
> index f6f30f5bf15a..7a24bde7ca8d 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__);
>
> gpio_set_value(par->gpio.reset, 0);
> - udelay(20);
> + usleep_range(20, 25);
> gpio_set_value(par->gpio.reset, 1);
> mdelay(120);
> }
> diff --git a/drivers/staging/fbtft/fb_ra8875.c b/drivers/staging/fbtft/fb_ra8875.c
> index 5d3b76ca74d8..e2a62677b65b 100644
> --- a/drivers/staging/fbtft/fb_ra8875.c
> +++ b/drivers/staging/fbtft/fb_ra8875.c
> @@ -217,7 +217,7 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...)
> }
> len--;
>
> - udelay(100);
> + usleep_range(100, 101);

No, that's just shutting checkpatch up and not doing the correct thing
here. This is not ok, you need to provide a valid range that will
actually help. What you did here is not going to do fix anything.

sorry,

greg k-h

\
 
 \ /
  Last update: 2018-08-08 14:19    [W:0.239 / U:1.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site