Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2786156rwl; Mon, 27 Mar 2023 05:25:22 -0700 (PDT) X-Google-Smtp-Source: AKy350bN3H1Tes13UjicvE/DYKNAJFSQw1Do8pYqAkpN2tlo16mBrUDwuNPU6HHG3hdLR9NEMaQM X-Received: by 2002:a17:907:1ca1:b0:945:5510:2b9f with SMTP id nb33-20020a1709071ca100b0094555102b9fmr2973767ejc.54.1679919922583; Mon, 27 Mar 2023 05:25:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679919922; cv=none; d=google.com; s=arc-20160816; b=MNT+P7BB0GZXytsPoixpRsOQ80lRlZKrCov+Zf7nDo530eAqktjOCJRUsYpV9uZCUY dw+n7obF38sDr2mwtmeyA5bs0QBwvTtdWP+Rd6kE1EYY7Yamxig3UFIcS+e/omgrfAKh hpZjDuVLmAXnGP5uifrBz9xUddPfE9RBuDxyHDGI1qxSesH8Z3f6fM7+jW+ZTfSQiCKs 66WJcDV0vuagBRkDNRwWEPPZncP32AsVr3qAzkmKJAQp9lQtFZUohFqCt772DwYoWCGd r/tpnqjLQ4nyoWldbOXaXch3nhEEeIeejM9UimFBPWLx39m7/at8JkUyWywa6IyhXhgk EiNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=bSN9Ecs9VgPdHBd5DnU/Mgt1P34wB8c/uf3669zchqk=; b=OZ0lsFGsgfijCxOlMWp2pPLG5/EAcybrx+xzgX7XFQQoKYE2127BVkOEtwoBvQZIJx Mh6ClMPbp8rdqXrE3SFxFntXVJac+8nBR2r7/cVO76uwE1lT9VbqVq/2pbqeVLCIcSnb p9gKwqDJFtA861iilOsn3mUquu3pW8xGEFS8TdcWPBo+/25oRqqTWwDwuN1WXsoB0rXx A4CzQ0mIDu/PJxPqueFQNf2UfHhJsHbQEQxvla7I4UhPORmKEqVpL1pzBvaNbnPrxG/O liaMoJXyQjmGVXQk15dZYbruRDFbv3zUEndMagr6e/IjW1hFf0vO2KIUZ1K3jZHFIXrJ dA5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UsozCZrq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j22-20020a170906535600b00927012f155fsi31703675ejo.285.2023.03.27.05.24.58; Mon, 27 Mar 2023 05:25:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UsozCZrq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231932AbjC0MYR (ORCPT + 99 others); Mon, 27 Mar 2023 08:24:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232417AbjC0MYM (ORCPT ); Mon, 27 Mar 2023 08:24:12 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FE912D65; Mon, 27 Mar 2023 05:24:08 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id r29so8561285wra.13; Mon, 27 Mar 2023 05:24:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679919846; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=bSN9Ecs9VgPdHBd5DnU/Mgt1P34wB8c/uf3669zchqk=; b=UsozCZrqIdoaol4lsXeG6Jm+fEgT2eIoHwmPfbkhHu60pYddYnrGELrNj1HM16VO+g 0VN25oOSeZkqv+Hu3w+i2vQLWz2f3sg0+zUfS7wRrFIA8riP8pcogE6cJkmeQXdKvZaq lshsdJbAYQWg9U4GfIh7vlX1Ns9/q30KoaujAEnVjQz2l6EcV21uCqoLbxfkDapZ3v21 6dZh9/nq2oLXkDjurwy0B06V1qGbqMp73x3uKoedFJ6b70VBP15kVuNSNa6hN41rTjO8 shSZupws5iDXSHKpEdTl+LpxUyyTrFmh01bL3urp/TTUdRq0xesowqqTlw28UrJv2dj3 aJmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679919846; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=bSN9Ecs9VgPdHBd5DnU/Mgt1P34wB8c/uf3669zchqk=; b=pBptnsgdE9KT35Zm8RFLsmWAf+Zr+Y6OT73O0ne3Zq+dR9PyHXNcjIm3TrqKL6xfpA b81dn2JqeSw6TPaEdZGJXhhJa55UyMVm33uxw7jKwr+yOysw0QY4f7LZD887MTDoDPK+ 53RPoTW/I+D1/fs4eWvN5AgaOE6WuFkeM4XIN2LojmKPGIUM1G2DmZPBB+ywGHJr1+5A vmAMD81b5Td0V6GOzU1D1YubezsXQcShuxxBJjsHm3igJGqcAU7CXT6emBwIzgiLpyY/ WY2micAfftODI5AbqanMpSI0wNaGHp8kbm9L6QTq8T70cpriBXPBc2QwmHHuBj9JBsY4 YZZg== X-Gm-Message-State: AAQBX9f4qZTqEr/LW/0nwN3I27j63cZtwXZhuV2dkh5GIMRaHyiwnurX 6wG8j4OLLeyIEOteuLvHVl/m2fN5V+3ubf38 X-Received: by 2002:adf:d849:0:b0:2ce:aa2f:55ff with SMTP id k9-20020adfd849000000b002ceaa2f55ffmr10455838wrl.1.1679919846201; Mon, 27 Mar 2023 05:24:06 -0700 (PDT) Received: from khadija-virtual-machine ([39.41.14.14]) by smtp.gmail.com with ESMTPSA id n16-20020adffe10000000b002cfe63ded49sm25001223wrr.26.2023.03.27.05.24.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Mar 2023 05:24:05 -0700 (PDT) Date: Mon, 27 Mar 2023 17:24:03 +0500 From: Khadija Kamran To: outreachy@lists.linux.dev Cc: Marc Dietrich , Greg Kroah-Hartman , ac100@lists.launchpad.net, linux-tegra@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH] staging: nvec: replace udelay() with usleep_range() Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace 'udelay()' with 'usleep_range()' with 1000us as upper limit. This issue is reported by checkpatch.pl script. CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst Signed-off-by: Khadija Kamran --- drivers/staging/nvec/nvec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index b3f114cb00dc..1b51935dba4f 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c @@ -627,7 +627,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev) break; case 2: /* first byte after command */ if (status == (I2C_SL_IRQ | RNW | RCVD)) { - udelay(33); + usleep_range(33, 1000); if (nvec->rx->data[0] != 0x01) { dev_err(nvec->dev, "Read without prior read command\n"); @@ -714,7 +714,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev) * We experience less incomplete messages with this delay than without * it, but we don't know why. Help is appreciated. */ - udelay(100); + usleep_range(100, 1000); return IRQ_HANDLED; } -- 2.34.1