From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB5ABC433EF for ; Sun, 17 Oct 2021 09:38:50 +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 ADAE660F35 for ; Sun, 17 Oct 2021 09:38:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org ADAE660F35 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZPjC4mzYuybwvLODXqY6TIFz1ofk/jSSb3qpFKhUoZA=; b=xURbZNVsb4hiFo rw41tbyjY8ISqG5KaSMyc4dppAw9mieMcndyWwF09NLvXZ8MgiMoTzXkqxC+0Bk/TaQhcV0xZlRaZ 7Kklojq1dxmLxbi8Xa2DGzDMJIOndRZcB0v45KBJQTMEpE6xCfhRhuRHqux9L6b49C8zyG5rOyK6b Tzho58o7N8Y5F1tV+RyY7Q8d00yUgpFffUtQ8HzlB/v6e0TJsG+eZw6yGZJ3+JepITWk5f0SLGIIO sshnv41DYnLQz8DSxzQktl379gzwRVfUG13CIUgkopWfXPXhb15k1h0FvqZ9Hpy5/b0BfhzyOxPZW HA2c3T4yDJkyPusT2UbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mc2br-00C1Xz-BN; Sun, 17 Oct 2021 09:37:39 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mc2bn-00C1XJ-Cm for linux-arm-kernel@lists.infradead.org; Sun, 17 Oct 2021 09:37:36 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 376EF60F23; Sun, 17 Oct 2021 09:37:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1634463453; bh=TnThaLix6SFkYNB2+9atk2ZdBdQ0TC8TXqRaqicaHi4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UF11qCPicbcA0HJPW0PLBaAkIKIYHVexVZimVnnT4rwkh/FATGQrEqOI9LLKkqgVl ZdXElZabCc/v+T65lcg0u6cH0YAsOwByFKz6cWwbWBQ1C/Vc3RJ5lyURGOK+XrA+FU sdwc06Sz6NLVxFYLzjNPyqfhicBq2gevOoNxHSR8= Date: Sun, 17 Oct 2021 11:37:30 +0200 From: Greg KH To: Kushal-kothari Cc: linux-arm-kernel@lists.infradead.org, mike.rapoport@gmail.com, kushalkothari2850@gmail.com, outreachy-kernel@googlegroups.com, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev, nsaenz@kernel.org, bcm-kernel-feedback-list@broadcom.com Subject: Re: [PATCH v2] staging: vc04_services: replace msleep() by usleep_range() Message-ID: References: <20211017092900.134752-1-kushalkothari285@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211017092900.134752-1-kushalkothari285@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211017_023735_482872_1E64B31F X-CRM114-Status: GOOD ( 15.74 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Oct 17, 2021 at 02:59:00PM +0530, Kushal-kothari wrote: > Fixed the warning:-msleep < 20ms can sleep for up to 20ms by replacing > msleep(unsigned long msecs) by usleep_range(unsigned long min, unsigned long max) No need to put the parameters in a function call. > in usecs as msleep(1ms~20ms) can sleep for upto 20 ms. > > Signed-off-by: Kushal-kothari We need a "Legal" name here, is that how you sign documents? Sorry, I have to ask. > --- > > Changes from v1: Reword both the subject and the log message. > > 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 6fbafdfe340f..80a7898c5331 100644 > --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c > +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c > @@ -857,7 +857,7 @@ vchiq_bulk_transmit(unsigned int handle, const void *data, unsigned int size, > if (status != VCHIQ_RETRY) > break; > > - msleep(1); > + usleep_range(1000, 2000); You can not just randomly pick a range value here without lots of testing and knowing that the hardware really can support this. Have you done this here? thanks, greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel