* [PATCH] Staging: speakup: speakup_keypc.c: usleep_range is preferred over udelay
@ 2017-07-12 11:23 Jaya Durga
2017-07-12 12:37 ` Greg KH
2017-07-12 12:37 ` Samuel Thibault
0 siblings, 2 replies; 3+ messages in thread
From: Jaya Durga @ 2017-07-12 11:23 UTC (permalink / raw)
To: gregkh
Cc: w.d.hubbs, chris, kirk, samuel.thibault, okash.khawaja, dhowells,
arushisinghal19971997, robsonde, speakup, devel, linux-kernel,
Jaya Durga
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)
#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);
buf++;
}
return NULL;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Staging: speakup: speakup_keypc.c: usleep_range is preferred over udelay
2017-07-12 11:23 [PATCH] Staging: speakup: speakup_keypc.c: usleep_range is preferred over udelay Jaya Durga
@ 2017-07-12 12:37 ` Greg KH
2017-07-12 12:37 ` Samuel Thibault
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2017-07-12 12:37 UTC (permalink / raw)
To: Jaya Durga
Cc: w.d.hubbs, chris, kirk, samuel.thibault, okash.khawaja, dhowells,
arushisinghal19971997, robsonde, speakup, devel, linux-kernel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Staging: speakup: speakup_keypc.c: usleep_range is preferred over udelay
2017-07-12 11:23 [PATCH] Staging: speakup: speakup_keypc.c: usleep_range is preferred over udelay Jaya Durga
2017-07-12 12:37 ` Greg KH
@ 2017-07-12 12:37 ` Samuel Thibault
1 sibling, 0 replies; 3+ messages in thread
From: Samuel Thibault @ 2017-07-12 12:37 UTC (permalink / raw)
To: Jaya Durga
Cc: gregkh, w.d.hubbs, chris, kirk, okash.khawaja, dhowells,
arushisinghal19971997, robsonde, speakup, devel, linux-kernel
Jaya Durga, on mer. 12 juil. 2017 16:53:53 +0530, wrote:
> Fix checkpatch issue: CHECK: usleep_range is preferred over udelay;
IIRC synth_immediate is meant to be usable in atomic contexts too, so
usleep can't be used.
Samuel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-12 12:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-12 11:23 [PATCH] Staging: speakup: speakup_keypc.c: usleep_range is preferred over udelay Jaya Durga
2017-07-12 12:37 ` Greg KH
2017-07-12 12:37 ` Samuel Thibault
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.