[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d09502f2-84d2-839f-1350-ae7f248e5981@raspberrypi.com>
Date: Wed, 15 Sep 2021 09:06:09 +0100
From: Phil Elwell <phil@...pberrypi.com>
To: Stefan Wahren <stefan.wahren@...e.com>,
Gaston Gonzalez <gascoar@...il.com>,
linux-staging@...ts.linux.dev
Cc: gregkh@...uxfoundation.org, nsaenz@...nel.org, arnd@...db.de,
dan.carpenter@...cle.com, ojaswin98@...il.com,
amarjargal16@...il.com, linux-rpi-kernel@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org,
bcm-kernel-feedback-list@...adcom.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/8] staging: vchiq_arm: replace sleep() with
usleep_range()
Hi Stefan,
On 15/09/2021 06:21, Stefan Wahren wrote:
> Hi,
>
> Am 14.09.21 um 23:35 schrieb Gaston Gonzalez:
>> 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);
>
> from my understanding the usage of usleep_range() and hrtimers isn't
> necessary here. The intention is to sleep a little bit and not "exactly"
> 1 ms.
>
> @Phil Elwell: what is your opinion?
Exactly - the aim is just to stop it spinning.
Phil
Powered by blists - more mailing lists