From: Greg KH <greg@kroah.com>
To: Hassan Shahbazi <hassan.shahbazi@somia.fi>
Cc: linus.walleij@linaro.org, devel@driverdev.osuosl.org,
Hassan Shahbazi <hassan@ninchat.com>,
linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] staging: fbtft: fb_watterott: fix usleep_range is preferred over udelay
Date: Sun, 1 Nov 2020 07:39:48 +0100 [thread overview]
Message-ID: <20201101063948.GB432418@kroah.com> (raw)
In-Reply-To: <20201101002010.278537-1-hassan@ninchat.com>
On Sun, Nov 01, 2020 at 02:20:10AM +0200, Hassan Shahbazi wrote:
> Fix the checkpath.pl issue on fb_watterott.c. write_vmem and
> write_vmem_8bit functions are within non-atomic context and can
> safely use usleep_range.
> see Documentation/timers/timers-howto.txt
>
> Signed-off-by: Hassan Shahbazi <hassan@ninchat.com>
> ---
> drivers/staging/fbtft/fb_watterott.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/fbtft/fb_watterott.c b/drivers/staging/fbtft/fb_watterott.c
> index 76b25df376b8..afcc86a17995 100644
> --- a/drivers/staging/fbtft/fb_watterott.c
> +++ b/drivers/staging/fbtft/fb_watterott.c
> @@ -84,7 +84,7 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len)
> par->txbuf.buf, 10 + par->info->fix.line_length);
> if (ret < 0)
> return ret;
> - udelay(300);
> + usleep_range(300, 310);
> }
>
> return 0;
> @@ -124,7 +124,7 @@ static int write_vmem_8bit(struct fbtft_par *par, size_t offset, size_t len)
> par->txbuf.buf, 10 + par->info->var.xres);
> if (ret < 0)
> return ret;
> - udelay(700);
> + usleep_range(700, 710);
How do you know that these ranges are ok? Are you able to test these
changes with real hardware?
thanks,
greg k-h
next prev parent reply other threads:[~2020-11-01 6:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-01 0:20 Hassan Shahbazi
2020-11-01 6:39 ` Greg KH [this message]
2020-11-01 10:32 ` Hassan Shahbazi
2020-11-06 10:01 ` Greg KH
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=20201101063948.GB432418@kroah.com \
--to=greg@kroah.com \
--cc=devel@driverdev.osuosl.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hassan.shahbazi@somia.fi \
--cc=hassan@ninchat.com \
--cc=linus.walleij@linaro.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®