lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 8 Aug 2018 14:18:15 +0200
From:   Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:     Leonardo Brás <leobras.c@...il.com>
Cc:     Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [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@...il.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

Powered by blists - more mailing lists