[PATCH v2 0/3] Fixup some coccicheck warnings

Christian König christian.koenig at amd.com
Wed Aug 16 14:09:43 UTC 2023


Am 16.08.23 um 15:50 schrieb Harry Wentland:
> On 2023-08-16 09:15, Lazar, Lijo wrote:
>> This series decreases the readability of the code. Is it really a rule to fix such warnings or is it only a generic pointer to double check (not to be followed every time)?
>>
> I'm a little tired seeing these changes come in and agree. I see
> no value in this change. The old lines in the change actually
> have fewer characters and more whitespace, making them more
> readable.

For this specific the min()/max() changes I'm not a big fan of that either.

They are also not mandatory by the coding standard but just a 
recommendation coming from cocci I think.

Christian.

>
> Harry
>
>> Thanks,
>> Lijo
>>
>> On 8/16/2023 5:02 PM, Srinivasan Shanmugam wrote:
>>> v2:
>>>
>>> Updated to max_t/min_t along with commit title message
>>>
>>> Srinivasan Shanmugam (3):
>>>     drm/amd/display: Update ternary operator with min_t() in
>>>       'do_aquire_global_lock'
>>>     drm/amdgpu: Update ternary operator with max_t() in
>>>       'amdgpu_fence_wait_polling'
>>>     drm/amdgpu: Update ternary operator with min_t() in
>>>       'amdgpu_ras_eeprom_init'
>>>
>>>    drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c         | 2 +-
>>>    drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c    | 2 +-
>>>    drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
>>>    3 files changed, 3 insertions(+), 3 deletions(-)
>>>



More information about the amd-gfx mailing list