From patchwork Tue Oct 18 16:04:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tanjuate Brunostar X-Patchwork-Id: 4244 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp2046496wrs; Tue, 18 Oct 2022 09:25:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4jqK23EnBAEDl5p+0pbd+m7EmyNjW1oEqQ0QV+juoc/+qCnEAWU6rxHPHR9nhLUQrihVHa X-Received: by 2002:a17:907:160c:b0:78d:b6f5:9f56 with SMTP id hb12-20020a170907160c00b0078db6f59f56mr1805265ejc.325.1666110339198; Tue, 18 Oct 2022 09:25:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666110339; cv=none; d=google.com; s=arc-20160816; b=JnKEwZBPKN1JIOYUxyqQki/KbaUvX2Eul30B6hgz+BX143o+QrRSPkvVTOZTn9733H d4cnD/kkTg3qauNQxIEPYMufa0SIlwMXuOEjxM+uKbNKjGPCX/3eXZabHh0vgDCYa4+/ kbOanAgJ6c3NmP1DMJ9tUtbVo9BgFGE72eB4QrMSoxQAa4gplaZHZ/zB3UwTKcJdo85T Bq1zj6V7r5+2rG5Mm42TaIZjhrTzNl5uOFF5vn9H2UbOvenmqNu2T7tluWdarqjk0bdj IRekSz+W7vGyRN92toj7aMMX72aUGh+masxMXq9aSmvRhShAtdCPiGxtVuRycHsKvnpe C7hw== 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:to:from:date:dkim-signature; bh=APq/4ao2w3wM3w7dcXNTLMlvNyes52nnBtuQjcx7EAg=; b=R5RGllU9dqinpv1QPXNoZVyOaxp1+8cqK/ZoPoccmhvin273M007vGxyPxi1ZEUvnB IFNvr/3PEbl9rBr2auxDmtFtxRnWhSFWm1jQN3dMPCM1tx/cvZUOeaoR40m18H0VOkjy 9L137SLwPCV9QH7+tMLGdMYNDIReIV9T6hcaj5Xdqczo8JvlSyn0x318tcmsMXfe6Bf/ sytoTXp7E2c/Fck3LFIG5E9il491TZ6l5Xj4ZkJWnyu78LR9mbe7GIdZIA4zV8Y6tktY 13VRO3PNhVz1yJHe21ZkcJpwNSmp0qGZ2I23GZqkhAPXE3+V/6NOGSL1qgGvKVaGQVN0 aw9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=mAYUdBVX; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bx20-20020a170906a1d400b0078d40f7ef1fsi10877242ejb.330.2022.10.18.09.25.10; Tue, 18 Oct 2022 09:25:39 -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=mAYUdBVX; 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 S230494AbiJRQEJ (ORCPT + 99 others); Tue, 18 Oct 2022 12:04:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230442AbiJRQEG (ORCPT ); Tue, 18 Oct 2022 12:04:06 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89D34A02F0 for ; Tue, 18 Oct 2022 09:04:05 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id c20so18554302ljj.7 for ; Tue, 18 Oct 2022 09:04:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=APq/4ao2w3wM3w7dcXNTLMlvNyes52nnBtuQjcx7EAg=; b=mAYUdBVX9g0h7NVEsuArwdO+JSkTYINBI9eZ9SZP/HN1C28OzOzJFvyKJ7HWDvfuR+ ncjq9cqJiYAoowUdIMYtYwgu2CBQnKus2tJAPA8Wbv25BnCyqru7+yMa0n1Wc/g/b+tJ LYDVxVxEyeXNaZclFdXvci+Bn8Hd2IlqxBU+6QRev104SvVpDc5r8rI7mjqlJ8z57vKa T+d9YFon6GhU0JC5SBnQt1DQRpBiVFGkOizCTTxQePe274xFh4s+7Paymc8y/UsfZn1k m7syJJNF9ptZ8MZHEKbEkunJ+svNoDlC+HXUM0w2et72jP1HztzI+RkLlC7QPZI/PtHI Eo1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=APq/4ao2w3wM3w7dcXNTLMlvNyes52nnBtuQjcx7EAg=; b=4GYhBd3HrpUnZMEap4lHYzvAkOTLjW7N6foMxi+4SQQPjDqBB+mdLIiNyRFDpQ0BhA hUN48PshqEI+PwMgdgTjZgkcjIDWRO8f6JABEnAmVNPbQbW29H2wNS+Sr7lvWqgWB2xU UlnLPL5RbUVYoDa9/PFtCBr0h/A3sLSed2Ry3YywI77UHzqedGrVknFw3C4aoKqH9jpf cVa9EvpoLM2pakmB4AH0xi3/VrNMV7Mg9YpmRxFxbFkBJNpyjE1YYMJT0Rpm2g/JmzUc PQwLKTsrmiZJQks4drbr7jN/SzYqB/pfuWVV+zo0U7Tu61OQkQR26kGmMnM7QvS0gxmO fvTw== X-Gm-Message-State: ACrzQf1o7KyyHnk/g1E4F0V0FIEvJrDFKHzrTqZ8xyr0svVzyuF/5UJA pPKAq3YtejKcvmVDpxkesBI= X-Received: by 2002:a05:651c:194a:b0:26f:decf:a6b5 with SMTP id bs10-20020a05651c194a00b0026fdecfa6b5mr1392362ljb.240.1666109043367; Tue, 18 Oct 2022 09:04:03 -0700 (PDT) Received: from elroy-temp-vm ([20.240.130.248]) by smtp.gmail.com with ESMTPSA id v8-20020a056512348800b004a25468d86asm1905039lfr.68.2022.10.18.09.04.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 09:04:02 -0700 (PDT) Date: Tue, 18 Oct 2022 16:04:02 +0000 From: Tanjuate Brunostar To: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy@lists.linux.dev Subject: [PATCH v2] staging: rts5208: Replace instances of udelay by usleep_range Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747035410710689064?= X-GMAIL-MSGID: =?utf-8?q?1747043315358844552?= Replace the use of udelay by usleep_range as suggested by checkpatch: CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst + udelay(30); CHECK: usleep_range is preferred over udelay; see Documentation/timers/timers-howto.rst + udelay(50); Signed-off-by: Tanjuate Brunostar --- v2: changed the max values of the usleep_rage instances as they cannot be equal to the min values as suggested by checkpatch drivers/staging/rts5208/ms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rts5208/ms.c b/drivers/staging/rts5208/ms.c index 14449f8afad5..a9724ca5eccf 100644 --- a/drivers/staging/rts5208/ms.c +++ b/drivers/staging/rts5208/ms.c @@ -3235,7 +3235,7 @@ static int ms_write_multiple_pages(struct rtsx_chip *chip, u16 old_blk, return STATUS_FAIL; } - udelay(30); + usleep_range(30, 31); rtsx_init_cmd(chip); @@ -4157,7 +4157,7 @@ int mg_set_ICV(struct scsi_cmnd *srb, struct rtsx_chip *chip) #ifdef MG_SET_ICV_SLOW for (i = 0; i < 2; i++) { - udelay(50); + usleep_range(50, 51); rtsx_init_cmd(chip);