On 2023/8/22 20:32, Mikko Perttunen wrote:
> On 8/22/23 10:15, Jinjie Ruan wrote:
>> Return PTR_ERR_OR_ZERO() instead of return 0 or PTR_ERR() to
>> simplify code.
>>
>> Signed-off-by: Jinjie Ruan
>> ---
>> drivers/gpu/drm/tegra/drm.c | 5 +
>> drivers/gpu/drm/tegra/gem.c | 5 +
>>
The driver depends on CONFIG_OF, it is not necessary to use
of_match_ptr() here.
Signed-off-by: Ruan Jinjie
Reviewed-by: Daniel Thompson
---
drivers/video/backlight/led_bl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/led_bl.c b/drivers/video
The driver depends on CONFIG_OF, it is not necessary to use
of_match_ptr() here.
Signed-off-by: Ruan Jinjie
---
drivers/video/fbdev/atmel_lcdfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/atmel_lcdfb.c
b/drivers/video/fbdev/atmel_lcdfb.c
index
Use memdup_user_nul() helper instead of open-coding to simplify the code.
Signed-off-by: Ruan Jinjie
---
drivers/gpu/drm/msm/adreno/adreno_gpu.c | 14 +++---
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
b/drivers/gpu/drm/msm
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 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/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
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 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
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
Ping.
On 2023/7/24 22:36, Ruan Jinjie wrote:
> From: ruanjinjie
>
> Use the devm_platform_ioremap_resource() helper instead of calling
> platform_get_resource() and devm_ioremap_resource() separately.
>
> Signed-off-by: Ruan Jinjie
> ---
> drivers/gpu/drm/tegra/h
It is not possible for platform_get_irq() to return 0. Use the
return value from platform_get_irq().
Signed-off-by: Ruan Jinjie
---
drivers/gpu/drm/mediatek/mtk_dpi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c
b/drivers/gpu/drm
ror reason.
Changes in v2:
- Update the cover letter to fix the style warning.
Ruan Jinjie (2):
drm/panfrost: Do not check for 0 return after calling
platform_get_irq_byname()
drm/mediatek: Do not check for 0 return after calling
platform_get_irq()
drivers/gpu/drm/mediatek/mtk_dpi.
It is not possible for platform_get_irq_byname() to return 0.
Use the return value from platform_get_irq_byname().
Signed-off-by: Ruan Jinjie
---
drivers/gpu/drm/panfrost/panfrost_gpu.c | 4 ++--
drivers/gpu/drm/panfrost/panfrost_job.c | 4 ++--
drivers/gpu/drm/panfrost/panfrost_mmu.c | 4
It is not possible for platform_get_irq_byname() to return 0.
Use the return value from platform_get_irq_byname().
Signed-off-by: Ruan Jinjie
---
drivers/gpu/drm/panfrost/panfrost_gpu.c | 4 ++--
drivers/gpu/drm/panfrost/panfrost_job.c | 4 ++--
drivers/gpu/drm/panfrost/panfrost_mmu.c | 4
It is not possible for platform_get_irq() to return 0. Use the
return value from platform_get_irq().
Signed-off-by: Ruan Jinjie
---
drivers/gpu/drm/mediatek/mtk_dpi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c
b/drivers/gpu/drm
ror reason.
Ruan Jinjie (2):
drm/panfrost: Do not check for 0 return after calling
platform_get_irq_byname()
drm/mediatek: Do not check for 0 return after calling
platform_get_irq()
drivers/gpu/drm/mediatek/mtk_dpi.c | 4 ++--
drivers/gpu/drm/panfrost/panfrost_gpu.c | 4 ++--
drive
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
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 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/7/27 14:57, Uwe Kleine-König wrote:
> Hello,
>
> On Thu, Jul 27, 2023 at 11:39:23AM +0000, Ruan Jinjie wrote:
>> There is no need to call the DSSERR() function directly to print
>> a custom message when handling an error from platform_get_irq() function
>> a
There is no need to call the DSSERR() function directly to print
a custom message when handling an error from platform_get_irq() function
as it is going to display an appropriate error message
in case of a failure.
Signed-off-by: Ruan Jinjie
---
drivers/gpu/drm/omapdrm/dss/dispc.c | 1
There is no need to call the DRM_DEV_ERROR() function directly to print
a custom message when handling an error from platform_get_irq() function
as it is going to display an appropriate error message
in case of a failure.
Signed-off-by: Ruan Jinjie
---
drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c
From: ruanjinjie
Use the devm_platform_ioremap_resource() helper instead of calling
platform_get_resource() and devm_ioremap_resource() separately.
Signed-off-by: Ruan Jinjie
---
drivers/gpu/drm/tegra/hdmi.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu
Thank you very much!
On 2022/9/26 15:16, Thomas Zimmermann wrote:
> Hi
>
> Am 26.09.22 um 04:32 schrieb ruanjinjie:
>> The symbol is not used outside of the file, so mark it static.
>>
>> Fixes the following warning:
>>
>> drivers/gpu/drm/ast/ast_drv.c:42:5: warning: symbol 'ast_modeset'
>> was n
Thank you very much!
On 2022/9/26 0:21, Helge Deller wrote:
> On 9/22/22 03:37, ruanjinjie wrote:
>> Replace pci_enable_device() with pcim_enable_device(),
>> pci_disable_device() and pci_release_regions() will be
>> called in release automatically.
>>
>> Signed-off-by: ruanjinjie
>
> applied.
>
30 matches
Mail list logo