From: Greg KH <gregkh@linuxfoundation.org>
To: Jaya Durga <rjdurga@gmail.com>
Cc: w.d.hubbs@gmail.com, chris@the-brannons.com, kirk@reisers.ca,
samuel.thibault@ens-lyon.org, okash.khawaja@gmail.com,
dhowells@redhat.com, arushisinghal19971997@gmail.com,
robsonde@gmail.com, speakup@linux-speakup.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: speakup: speakup_keypc.c: usleep_range is preferred over udelay
Date: Wed, 12 Jul 2017 14:37:02 +0200 [thread overview]
Message-ID: <20170712123702.GA26247@kroah.com> (raw)
In-Reply-To: <1499858633-31162-1-git-send-email-rjdurga@gmail.com>
On Wed, Jul 12, 2017 at 04:53:53PM +0530, Jaya Durga wrote:
> Fix checkpatch issue: CHECK: usleep_range is preferred over udelay;
>
> Signed-off-by: Jaya Durga <rjdurga@gmail.com>
> ---
> drivers/staging/speakup/speakup_keypc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/speakup/speakup_keypc.c b/drivers/staging/speakup/speakup_keypc.c
> index d3203f8..1ba4cfc 100644
> --- a/drivers/staging/speakup/speakup_keypc.c
> +++ b/drivers/staging/speakup/speakup_keypc.c
> @@ -28,7 +28,7 @@
>
> #define DRV_VERSION "2.10"
> #define SYNTH_IO_EXTENT 0x04
> -#define SWAIT udelay(70)
> +#define SWAIT usleep_range(70, 150)
Ick, why not just get rid of SWAIT entirely please?
> #define PROCSPEECH 0x1f
> #define SYNTH_CLEAR 0x03
>
> @@ -164,7 +164,7 @@ static const char *synth_immediate(struct spk_synth *synth, const char *buf)
> if (--timeout <= 0)
> return oops();
> outb_p(ch, synth_port);
> - udelay(70);
> + usleep_range(70, 150);
And you are sure it is ok to wait up to 150 long here?
thanks,
greg k-h
next prev parent reply other threads:[~2017-07-12 12:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 11:23 Jaya Durga
2017-07-12 12:37 ` Greg KH [this message]
2017-07-12 12:37 ` Samuel Thibault
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=20170712123702.GA26247@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arushisinghal19971997@gmail.com \
--cc=chris@the-brannons.com \
--cc=devel@driverdev.osuosl.org \
--cc=dhowells@redhat.com \
--cc=kirk@reisers.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=okash.khawaja@gmail.com \
--cc=rjdurga@gmail.com \
--cc=robsonde@gmail.com \
--cc=samuel.thibault@ens-lyon.org \
--cc=speakup@linux-speakup.org \
--cc=w.d.hubbs@gmail.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 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®