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  linux-hardening  linux-cve-announce  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]
Message-ID: <20170712123702.GA26247@kroah.com>
Date:   Wed, 12 Jul 2017 14:37:02 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Jaya Durga <rjdurga@...il.com>
Cc:     w.d.hubbs@...il.com, chris@...-brannons.com, kirk@...sers.ca,
        samuel.thibault@...-lyon.org, okash.khawaja@...il.com,
        dhowells@...hat.com, arushisinghal19971997@...il.com,
        robsonde@...il.com, speakup@...ux-speakup.org,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: speakup: speakup_keypc.c: usleep_range is
 preferred over udelay

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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ