Re: [PATCH 4/6] drm/amd/display: Fix warning about msleep in amdgpu_dm_helpers.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 6/29/23 09:53, Alex Deucher wrote:
> On Thu, Jun 29, 2023 at 12:47 AM Srinivasan Shanmugam
> <srinivasan.shanmugam@xxxxxxx> wrote:
>>
>> Fixes the following category of checkpatch warning:
>>
>> WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.rst
>> +               msleep(10);
>>
>> Cc: Rodrigo Siqueira <Rodrigo.Siqueira@xxxxxxx>
>> Cc: Aurabindo Pillai <aurabindo.pillai@xxxxxxx>
>> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@xxxxxxx>
>> ---
>>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
>> index c13b70629be6..a6be04ad387f 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c
>> @@ -643,7 +643,7 @@ static bool execute_synaptics_rc_command(struct drm_dp_aux *aux,
>>                 if (rc_cmd == cmd)
>>                         // active is 0
>>                         break;
>> -               msleep(10);
>> +               msleep(20);
> 
> This doesn't seem like the right fix.  The warning seems somewhat
> bogus to begin with.  If the length really matters, I guess we should
> use usleep_range(), but if not, I don't see any reason not to leave it
> as is.  Sure, it might sleep longer, but it might not.  Better to have
> the code stay as is since 10 was presumably the intended sleep time.
> 

I agree.

Harry

> Alex
> 
> 
>>         }
>>
>>         // read rc result
>> --
>> 2.25.1
>>




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux