Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756593AbdGLMhH (ORCPT ); Wed, 12 Jul 2017 08:37:07 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:45092 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750738AbdGLMhG (ORCPT ); Wed, 12 Jul 2017 08:37:06 -0400 Date: Wed, 12 Jul 2017 14:37:02 +0200 From: Greg KH To: Jaya Durga 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 Message-ID: <20170712123702.GA26247@kroah.com> References: <1499858633-31162-1-git-send-email-rjdurga@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1499858633-31162-1-git-send-email-rjdurga@gmail.com> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1081 Lines: 37 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 > --- > 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