public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Julia Lawall <julia.lawall@inria.fr>
Cc: Stefan Wahren <stefan.wahren@i2se.com>,
	Kushal-kothari <kushalkothari285@gmail.com>,
	linux-arm-kernel@lists.infradead.org, mike.rapoport@gmail.com,
	kushalkothari2850@gmail.com, outreachy-kernel@googlegroups.com,
	gregkh@linuxfoundation.org, 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()
Date: Wed, 3 Nov 2021 13:48:54 +0300	[thread overview]
Message-ID: <20211103104854.GO2794@kadam> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2110171433141.3026@hadrien>

On Sun, Oct 17, 2021 at 02:33:57PM +0200, Julia Lawall wrote:
> 
> 
> On Sun, 17 Oct 2021, Stefan Wahren wrote:
> 
> > Hi,
> >
> > Am 17.10.21 um 11:29 schrieb Kushal-kothari:
> > > 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)
> > > in usecs as msleep(1ms~20ms) can sleep for upto 20 ms.
> > >
> > > Signed-off-by: Kushal-kothari <kushalkothari285@gmail.com>
> > > ---
> > >
> > > 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);
> >
> > there was a recent discussion about this checkpatch warning [1]
> 
> Should there be a comment about it?

Even better would be an alternate wrapper around usleep(1) which would
silence the checkpatch warning.  Something like:

#define short_sleep() usleep(1)

regards,
dan carpenter

      parent reply	other threads:[~2021-11-03 10:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-17  9:29 [PATCH v2] staging: vc04_services: replace msleep() by usleep_range() Kushal-kothari
2021-10-17  9:37 ` Greg KH
2021-10-17  9:52 ` [Outreachy kernel] " Julia Lawall
2021-10-17 11:56 ` Stefan Wahren
2021-10-17 12:33   ` Julia Lawall
2021-10-17 12:47     ` Stefan Wahren
2021-11-03 10:48     ` Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211103104854.GO2794@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=julia.lawall@inria.fr \
    --cc=kushalkothari2850@gmail.com \
    --cc=kushalkothari285@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mike.rapoport@gmail.com \
    --cc=nsaenz@kernel.org \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=stefan.wahren@i2se.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox