Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2618737pxb; Sun, 17 Oct 2021 20:41:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHEhjW4sjpZe/xKIu7cn/+tgPYdJxrqMPxJ0jT4Sj/z+MJls5blozfhhFQkPBlsHiCmEfu X-Received: by 2002:a62:3102:0:b0:44b:63db:fc88 with SMTP id x2-20020a623102000000b0044b63dbfc88mr26604851pfx.75.1634528465972; Sun, 17 Oct 2021 20:41:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634528465; cv=none; d=google.com; s=arc-20160816; b=GgwBxxXGxpWlmPrUxAVIlBKssTnkU7RHH3WXrMYsg2sdeW5MG9X1TvqLKDMgCm/gtA yoD4lHA3sbNyNK7eeXBzLf2QLEc2Sn5W6Q+0tmzWxqVznQ0vnBDqZMRiNw1MpDgs0nMs 1WWgE0dpaYfIGaw/hM+LGM0/k+VAvycvPOYc4B7tAtc2Xg588tKRAzox16FtGLhsSBXH 3WdEkX0msHOCO99Qq8XXcqlUcQJo4XbtM00aB8Vfe93X+sXk7tYdIp/kalgqpfIzK3g3 xsV4t1XF0WZxZpFJYGWj2Xyj81PJ0g2l/hvAZMTSzcL/EKTwb7RuhgVu8RKHya5X+e1o k+MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=NB2XhddsQWXppfvEhHOXBA0BMVm+BrauudmsmIQtyRY=; b=GWz2QeQSAiivEVOPPf4KGl8Me4oM+LFht613nGo0ci+4OVYf8WmCDRamSrZKVuQV5I JOlx2ctbltdh8/QingGT8R45DOW1aCa72t0+wl84Dj/k41lcDyY7LtlQfze3XVpsoBh+ xH4ExEYdyZ1DP1jF9MrSM/jLfhMJ2xoHmjM43Jg7gtP3bKMfoXXwknlNnLdNJBCprxdI h7FOzCpyCNQPG9QokHCT8Eb9KM9lHZYnesCiK3NFIG/ura9u1Iwa/GzMXsNiwwy+cail FOPrL+/+8uiDTeGakO5mxIhEY3QtGO/ViLMZsujMyANvf6VvKS7FPBXt3wkpUXWFILG+ ujng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UF11qCPi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u9si25217932ple.97.2021.10.17.20.40.52; Sun, 17 Oct 2021 20:41:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UF11qCPi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235722AbhJQJjn (ORCPT + 98 others); Sun, 17 Oct 2021 05:39:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:55898 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234497AbhJQJjn (ORCPT ); Sun, 17 Oct 2021 05:39:43 -0400 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211017092900.134752-1-kushalkothari285@gmail.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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