Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1358970ybb; Sun, 29 Mar 2020 02:39:39 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtNIkljUggdJu0Sk83AQc5Y69QXGthEzrMe1vBRoHgxwSWs3G1Fr+MfY+pzsr3JaDwK4Gu2 X-Received: by 2002:aca:b441:: with SMTP id d62mr4546661oif.107.1585474779242; Sun, 29 Mar 2020 02:39:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585474779; cv=none; d=google.com; s=arc-20160816; b=BQc9kNuV0yuxqiAFxP+bbK2MEksff8ptMnkd9/WzQh2CKSF7lADjiQZCSIEhPl0t1j YfPbrjEsUg+JslGPRkG1nU9hfRYYYdHxzQKQnEGd7IqEWabEhmBghQbIGuRffDJpm+gy ennUZv78K84ql+Vv1H81kkEruYO2gs5nQAQ0++SXKC4rSVVkK7yur9hOJ6HB7lIinIF3 9xn2/PKBvLYWVBYKiogWxbXyWc5jOV+d/5tfJ5NJ3pQdKnwyYPP9ENm/AnMe6MHI7gtm TSJJjmRxk98CYY9dMeP9GZUi7+2CX7zy/B2NJCrFiUqBJ5bghTas4tQaZFrnUJ7xBmFH FuSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=+WD1cZEO1QgdAIv7ogdOsQN/fk+kF071YX9PbNGGQO0=; b=elNHNCkWZ4c2u2n/kYClGPpK2yKFhs6lFLS8NS79OghMU1QkKiUvsYup/5TRbGEY2h criaasRZ7SPCMk6BtUGOBGOSnR/0guoTeXgGGHRRTRr/x/qK4NnlhGTZVj1BYhN5FS2d Rp1esqjpkaeAD5DktKCgoXulV8OLLzZahSleSrbtZRswi+aQRY8ivys2+muM6YVAkY+i pvTvnfJO1UGaFUSNhBcr1Lw7zZUBWndRHo5iBOECMIPTxHm7xlSFmmE4EiD025IL3+ra 5R487XRX1+bOL/P3sXnUyfvUGA08TOvmHx6UvePcAeF0EU7ZjygSwBtWbHejW8kbd9z4 +TNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o203si4684075oig.1.2020.03.29.02.39.23; Sun, 29 Mar 2020 02:39:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727922AbgC2J2f (ORCPT + 99 others); Sun, 29 Mar 2020 05:28:35 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:26519 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727286AbgC2J2f (ORCPT ); Sun, 29 Mar 2020 05:28:35 -0400 X-IronPort-AV: E=Sophos;i="5.72,319,1580770800"; d="scan'208";a="442805364" Received: from abo-173-121-68.mrs.modulonet.fr (HELO hadrien) ([85.68.121.173]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Mar 2020 11:28:33 +0200 Date: Sun, 29 Mar 2020 11:28:33 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: "John B. Wyatt IV" cc: outreachy-kernel@googlegroups.com, Greg Kroah-Hartman , Payal Kshirsagar , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [Outreachy kernel] [PATCH] staging: fbtft: Replace udelay with preferred usleep_range In-Reply-To: <20200329092204.770405-1-jbwyatt4@gmail.com> Message-ID: References: <20200329092204.770405-1-jbwyatt4@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 29 Mar 2020, John B. Wyatt IV wrote: > Fix style issue with usleep_range being reported as preferred over > udelay. > > Issue reported by checkpatch. > > Please review. > > As written in Documentation/timers/timers-howto.rst udelay is the > generally preferred API. hrtimers, as noted in the docs, may be too > expensive for this short timer. > > Are the docs out of date, or, is this a checkpatch issue? > > Signed-off-by: John B. Wyatt IV > --- > drivers/staging/fbtft/fb_agm1264k-fl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/fbtft/fb_agm1264k-fl.c b/drivers/staging/fbtft/fb_agm1264k-fl.c > index eeeeec97ad27..019c8cce6bab 100644 > --- a/drivers/staging/fbtft/fb_agm1264k-fl.c > +++ b/drivers/staging/fbtft/fb_agm1264k-fl.c > @@ -85,7 +85,7 @@ static void reset(struct fbtft_par *par) > dev_dbg(par->info->device, "%s()\n", __func__); > > gpiod_set_value(par->gpio.reset, 0); > - udelay(20); > + usleep_range(20, 20); usleep_range should have a range, eg usleep_range(50, 100);. But it is hard to know a priori what the range should be. So it is probably better to leave the code alone. julia > gpiod_set_value(par->gpio.reset, 1); > mdelay(120); > } > -- > 2.25.1 > > -- > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200329092204.770405-1-jbwyatt4%40gmail.com. >