From patchwork Tue Sep 14 21:35:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaston Gonzalez X-Patchwork-Id: 12494907 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB8F4C433EF for ; Tue, 14 Sep 2021 21:38:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8425A60E8B for ; Tue, 14 Sep 2021 21:38:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8425A60E8B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=mNnHEKRk5dnMwF8J9lPPVm3U5bBxGVrUggOXp+lvexI=; b=OaHiR9hi/yTXRj IMAPeR0XLGfwr8KUPqlTRISNSivyW4l6igI6MZ9dJYdU4fqKf9RV/ig6fbkxmojS0da7S0qU3Em12 j0tQPK0ElqeDHgm97sBYkrD6lDGwn4avPypYJLvY0aupGmDdtzdudSnu8NJbY/aVjgvLxNVGANpsV 1cpQ7o+s79AaZbSmDDU4lAWSjUVWlo8Lsyu3gP5HuMQWKj8m1N991gfzqIPTzaqC638h0tLqRb4zh gFLkAocTduSvS8OzhEEfDQF0CoKdFdf0f6pL6r44evsuBvGtPChefEwH04f8hFMcSP6EJMuVkOGfB es6gh9g3ndtBbXlKABNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQG6E-00792C-RS; Tue, 14 Sep 2021 21:36:19 +0000 Received: from mail-qv1-xf2c.google.com ([2607:f8b0:4864:20::f2c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mQG6A-00790q-Kt; Tue, 14 Sep 2021 21:36:15 +0000 Received: by mail-qv1-xf2c.google.com with SMTP id 62so605547qvb.11; Tue, 14 Sep 2021 14:36:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=TM7n1dna53Y+KIAaPOy7ZFMjIdGf78aBP+tCGyC56Vg=; b=DAC1/pVsNhGIcvBmDc9SeGCceDyR50hfxd+iKWA/tz5Vo1SNNSZT0AAOBvDUjXQra3 eZvPTp9ko9mZyp64jH3sdV5Dht380B+OfR0YsRKUguudovbd7d/DIgkfrRBT+KkpQZJh 9TITi118J4Ah3TXRLEZmM0HYFPCL66PLUjAW2j+VWmooUta6tHTi6clOy4FLp8oHfRLO IiSbHzatBpg8dIv05lja0Ank4V56S6OSBNxEdAneqVRcC3O1yPzQ5HYhhAzyIW4EsGP7 idqPpGhEJmhugxPKOGzL85st/rmX3qXO/5AuDoCENlbRti0m628kg3uBUt+ukVqkxC5S mJhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=TM7n1dna53Y+KIAaPOy7ZFMjIdGf78aBP+tCGyC56Vg=; b=vvkXHQ1Zr9KIJ4RP7kLZ5Hv5wxuUcvftL67WoOks/WXJCsQj7z7icfR3Uaja/3owp6 0Az4Lr2Ml8qUfFH9ReQs7K/BdD+hgOBV3kHmpAFTMqGY6NpkmyEQdii1XD3Z24gAlnhe oGy3n9SoAK382IKC+k9hU4Rc11JAH7o4ZI4ocG8uKNh1kZ2CsV9z6atCHtdygc/X8/Pw EkgxbsEKmuBuiBN0+eJFSHRVx7UbZlyI/zfOV0m3zFeSprrjnU1hXnqs3ppLopR101K5 nAUeMi5gVUGeQFX4CYDT8jrLfErancApz4lrgxPtVgejmPYPI4Vo+ArOLQXESI1XkD5z g1Dg== X-Gm-Message-State: AOAM531HgtLdI/nzGoeWRyqW5qxQEsju0In+pmn2/BR2cGj1rtZcJXwk DMFMli5N38mixK/+U0M9h/c= X-Google-Smtp-Source: ABdhPJz2Zop7j8KONtVZ0sRJ5q7df0Ka9HDAi4ufXlIgii5Kyy9dx1qoT8OkUBU9HJovOF8haJu1VQ== X-Received: by 2002:a05:6214:12eb:: with SMTP id w11mr7840443qvv.10.1631655372329; Tue, 14 Sep 2021 14:36:12 -0700 (PDT) Received: from localhost.localdomain ([191.84.239.65]) by smtp.gmail.com with ESMTPSA id o7sm6716611qtw.87.2021.09.14.14.36.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 14:36:12 -0700 (PDT) From: Gaston Gonzalez To: linux-staging@lists.linux.dev Cc: gregkh@linuxfoundation.org, nsaenz@kernel.org, stefan.wahren@i2se.com, arnd@arndb.de, dan.carpenter@oracle.com, ojaswin98@gmail.com, amarjargal16@gmail.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org, gascoar@gmail.com Subject: [PATCH 1/8] staging: vchiq_arm: replace sleep() with usleep_range() Date: Tue, 14 Sep 2021 18:35:26 -0300 Message-Id: <20210914213532.396654-1-gascoar@gmail.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210914_143614_725588_23C77657 X-CRM114-Status: UNSURE ( 9.54 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org usleep_range() should be used instead of sleep() when sleepings range from 10 us to 20 ms, [1]. Reported by checkpatch.pl [1] Documentation/timers/timers-howto.txt --- drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c index b25369a13452..0214ae37e01f 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c @@ -824,7 +824,7 @@ vchiq_bulk_transmit(unsigned int handle, const void *data, unsigned int size, if (status != VCHIQ_RETRY) break; - msleep(1); + usleep_range(1000, 1100); } return status; @@ -861,7 +861,7 @@ enum vchiq_status vchiq_bulk_receive(unsigned int handle, void *data, if (status != VCHIQ_RETRY) break; - msleep(1); + usleep_range(1000, 1100); } return status;