All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Leonardo Brás" <leobras.c@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 01/15] staging: fbtft: Changes udelay(n) to usleep_range(n, n + x). - Style
Date: Wed, 8 Aug 2018 14:18:15 +0200	[thread overview]
Message-ID: <20180808121815.GA20272@kroah.com> (raw)
In-Reply-To: <355a96aa9bf3c29bbafc433a1b6e1662588250d8.1533686201.git.leobras.c@gmail.com>

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

  reply	other threads:[~2018-08-08 12:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-08  0:27 [PATCH v2 00/15] staging: fbtft: Fixes some issues found with checkpatch.pl Leonardo Brás
2018-08-08  0:28 ` [PATCH v2 01/15] staging: fbtft: Changes udelay(n) to usleep_range(n, n + x). - Style Leonardo Brás
2018-08-08 12:18   ` Greg Kroah-Hartman [this message]
2018-08-08  0:28 ` [PATCH v2 02/15] staging: fbtft: Puts macro arguments in parenthesis to avoid precedence issues " Leonardo Brás
2018-08-08  0:28 ` [PATCH v2 03/15] staging: fbtft: Fixes some alignment " Leonardo Brás
2018-08-08  0:28 ` [PATCH v2 04/15] staging: fbtft: Fixes some lines long lines (>80) " Leonardo Brás
2018-08-08 12:19   ` Greg Kroah-Hartman
2018-08-08  0:28 ` [PATCH v2 05/15] staging: fbtft: A bit more information on dev_err Leonardo Brás
2018-08-08  0:28 ` [PATCH v2 06/15] staging: fbtft: Changes gamma table to define Leonardo Brás
2018-08-08  0:29 ` [PATCH v2 07/15] staging: fbtft: Removes one nesting level to help readability - Style Leonardo Brás
2018-08-08  0:29 ` [PATCH v2 08/15] staging: fbtft: Adjust some empty-line problems " Leonardo Brás
2018-08-08  0:29 ` [PATCH v2 09/15] staging: fbtft: Erases some repetitive usage of function name " Leonardo Brás
2018-08-08  0:29 ` [PATCH v2 10/15] staging: fbtft: Fixes some defines styles " Leonardo Brás
2018-08-08 12:22   ` Greg Kroah-Hartman
     [not found]     ` <CADvQ+rGiF2kT62tBJjruGkQ8TbxU45PmgpW7xfrMy8xi1tOTBg@mail.gmail.com>
2018-08-09  9:49       ` Greg Kroah-Hartman
2018-08-08  0:29 ` [PATCH v2 11/15] staging: fbtft: Includes description to mutex and spinlock " Leonardo Brás
2018-08-08 12:22   ` Greg Kroah-Hartman
2018-08-08  0:29 ` [PATCH v2 12/15] staging: fbtft: Add spaces around / " Leonardo Brás
2018-08-08  0:29 ` [PATCH v2 13/15] staging: fbtft: Corrects long index line " Leonardo Brás
2018-08-08  0:30 ` [PATCH v2 14/15] staging: fbtft: Replaces (1 << n) for macro BIT(n) " Leonardo Brás
2018-08-08  0:30 ` [PATCH v2 15/15] staging: fbtft: Replaces custom debug macro with dev_dbg() Leonardo Brás
2018-08-08 12:24   ` Greg Kroah-Hartman

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=20180808121815.GA20272@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=leobras.c@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas.petazzoni@free-electrons.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.