Ther are many ternary operators, the true or false judgement
of which is unnecessary in C language semantics.
Signed-off-by: Ruan Jinjie
---
drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 2 +-
drivers/gpu/drm/amd/amdgpu/jpeg_v3_0.c | 2 +-
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c
On 2023/8/1 0:14, Limonciello, Mario wrote:
>
>
> On 7/31/2023 8:26 AM, Ruan Jinjie wrote:
>> Ther are many ternary operators, the true or false judgement
>> of which is unnecessary in C language semantics.
> s/Ther/There/
>
> Unnecessary; sure. But don't
On 2023/8/1 0:22, Tom Rix wrote:
>
> On 7/31/23 6:26 AM, Ruan Jinjie wrote:
>> Ther are many ternary operators, the true or false judgement
>> of which is unnecessary in C language semantics.
>>
>> Signed-off-by: Ruan Jinjie
>> ---
>
> sni
Ther are many pointers assigned first, which need not to be initialized, so
remove the NULL assignment.
Signed-off-by: Ruan Jinjie
---
drivers/gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c | 2 +-
drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 2 +-
drivers/gpu/drm/amd/pm
There are many ternary operators, the true or false judgement
of which is unnecessary in C language semantics.
Signed-off-by: Ruan Jinjie
---
v2:
- add the wrong removed true or false judgement hunk code
- Update the commit message, Ther -> There
---
drivers/gpu/drm/amd/amdgpu/amdgpu_bio
The NULL initialization of the pointers assigned by kzalloc() first is
not necessary, because if the kzalloc() failed, the pointers will be
assigned NULL, otherwise it works as usual. so remove it.
Signed-off-by: Ruan Jinjie
---
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c | 4 ++--
1 file
The NULL initialization of the pointer assigned by kzalloc() first is
not necessary, because if the kzalloc() failed, the pointer will be
assigned NULL, otherwise it works as usual. so remove it.
Signed-off-by: Ruan Jinjie
---
drivers/gpu/drm/virtio/virtgpu_submit.c | 2 +-
1 file changed, 1
The NULL initialization of the pointers assigned by
kunit_kzalloc() first is not necessary, because if kunit_kzalloc()
failed, the pointers will be assigned NULL, otherwise it works
as usual. so remove it.
Signed-off-by: Ruan Jinjie
---
.../gpu/drm/tests/drm_format_helper_test.c| 28
The NULL initialization of the pointers assigned by kzalloc() first is
not necessary, because if the kzalloc() failed, the pointers will be
assigned NULL, otherwise it works as usual. so remove it.
Signed-off-by: Ruan Jinjie
---
drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 +-
drivers/gpu/drm
The NULL initialization of the pointers assigned by kzalloc() first is
not necessary, because if the kzalloc() failed, the pointers will be
assigned NULL, otherwise it works as usual. so remove it.
Signed-off-by: Ruan Jinjie
---
drivers/gpu/drm/drm_agpsupport.c | 2 +-
drivers/gpu/drm
The NULL initialization of the pointers assigned by kzalloc() or
kunit_kzalloc() first is not necessary, because if the kzalloc() or
kunit_kzalloc() failed, the pointers will be assigned NULL, otherwise
it works as usual. so remove it.
Ruan Jinjie (7):
drm/amdkfd: Remove unnecessary NULL values
The NULL initialization of the pointers assigned by kzalloc() first is
not necessary, because if the kzalloc() failed, the pointers will be
assigned NULL, otherwise it works as usual. so remove it.
Signed-off-by: Ruan Jinjie
---
drivers/gpu/drm/radeon/radeon_agp.c | 2 +-
drivers
The NULL initialization of the pointers assigned by kzalloc() first is
not necessary, because if the kzalloc() failed, the pointers will be
assigned NULL, otherwise it works as usual. so remove it.
Signed-off-by: Ruan Jinjie
---
drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 4
13 matches
Mail list logo