Re: [PATCH -next 2/2] drm/tegra: Use PTR_ERR_OR_ZERO() to simplify code

2023-08-22 Thread Ruan Jinjie
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 + >>  

[PATCH -next RESEND] backlight: led_bl: Remove redundant of_match_ptr()

2023-08-17 Thread Ruan Jinjie
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

[PATCH -next] fbdev: atmel_lcdfb: Remove redundant of_match_ptr()

2023-08-11 Thread Ruan Jinjie
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

[PATCH -next] drm/msm/adreno: adreno_gpu: Switch to memdup_user_nul() helper

2023-08-10 Thread Ruan Jinjie
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

[PATCH -next 7/7] drm: Remove unnecessary NULL values

2023-08-08 Thread Ruan Jinjie
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

[PATCH -next 5/7] drm/virtio: Remove an unnecessary NULL value

2023-08-08 Thread Ruan Jinjie
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

[PATCH -next 6/7] drm/format-helper: Remove unnecessary NULL values

2023-08-08 Thread Ruan Jinjie
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

[PATCH -next 3/7] drm/msm: Remove unnecessary NULL values

2023-08-08 Thread Ruan Jinjie
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

[PATCH -next 4/7] drm/radeon: Remove unnecessary NULL values

2023-08-08 Thread Ruan Jinjie
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

[PATCH -next 2/7] drm/amd/display: Remove unnecessary NULL values

2023-08-08 Thread Ruan Jinjie
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

[PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values

2023-08-08 Thread Ruan Jinjie
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

[PATCH -next 0/7] drm: Remove many unnecessary NULL values

2023-08-08 Thread Ruan Jinjie
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

[PATCH -next v2] drm/amdgpu: Remove a lot of unnecessary ternary operators

2023-08-03 Thread Ruan Jinjie
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

Re: [PATCH -next] drm/tegra: hdmi: Use devm_platform_ioremap_resource()

2023-08-03 Thread Ruan Jinjie
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

[PATCH -next v2 2/2] drm/mediatek: Do not check for 0 return after calling platform_get_irq()

2023-08-02 Thread Ruan Jinjie
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

[PATCH -next v2 0/2] drm: Do not check for 0 return after calling platform_get_irq()

2023-08-02 Thread Ruan Jinjie
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.

[PATCH -next v2 1/2] drm/panfrost: Do not check for 0 return after calling platform_get_irq_byname()

2023-08-02 Thread Ruan Jinjie
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

[PATCH -next 1/2] drm/panfrost: Do not check for 0 return after calling platform_get_irq_byname()

2023-08-02 Thread Ruan Jinjie
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

[PATCH -next 2/2] drm/mediatek: Do not check for 0 return after calling platform_get_irq()

2023-08-02 Thread Ruan Jinjie
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

[PATCH -next 0/2] drm: Do not check for 0 return after calling platform_get_irq()

2023-08-02 Thread Ruan Jinjie
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

[PATCH -next] drm/amd/pm: Remove many unnecessary NULL values

2023-08-01 Thread Ruan Jinjie
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

Re: [PATCH -next] drm/amdgpu: Remove a lot of unnecessary ternary operators

2023-07-31 Thread Ruan Jinjie
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 they

Re: [PATCH -next] drm/amdgpu: Remove a lot of unnecessary ternary operators

2023-07-31 Thread Ruan Jinjie
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

[PATCH -next] drm/amdgpu: Remove a lot of unnecessary ternary operators

2023-07-31 Thread Ruan Jinjie
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

Re: [PATCH -next] drm: omapdrm: dss: Remove redundant DSSERR()

2023-07-27 Thread Ruan Jinjie
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 >>

[PATCH -next] drm: omapdrm: dss: Remove redundant DSSERR()

2023-07-26 Thread Ruan Jinjie
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

[PATCH -next] drm/msm: Remove redundant DRM_DEV_ERROR()

2023-07-26 Thread Ruan Jinjie
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

[PATCH -next] drm/tegra: hdmi: Use devm_platform_ioremap_resource()

2023-07-24 Thread Ruan Jinjie
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

Re: [PATCH -next] drm/ast: make ast_modeset static

2022-09-26 Thread Ruan Jinjie
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

Re: [PATCH -next] video: fbdev: tridentfb: Fix missing pci_disable_device() in probe and remove

2022-09-25 Thread Ruan Jinjie
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.