[PATCH linux-next] backlight: lp8788: use sysfs_emit() to instead of scnprintf()

2022-09-22 Thread cgel . zte
From: ye xingchen Replace the open-code with sysfs_emit() to simplify the code. Signed-off-by: ye xingchen --- drivers/video/backlight/lp8788_bl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/lp8788_bl.c b/drivers/video/backlight/lp8788_bl.c inde

[PATCH linux-next] backlight: use sysfs_emit() to instead of scnprintf()

2022-09-22 Thread cgel . zte
From: ye xingchen Replace the open-code with sysfs_emit() to simplify the code. Signed-off-by: ye xingchen --- drivers/video/backlight/lm3533_bl.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/video/backlight/lm3533_bl.c b/drivers/video/backlight/lm353

[PATCH linux-next] drm/vmwgfx: Remove the unneeded result variable

2022-09-19 Thread cgel . zte
From: ye xingchen Return the value ttm_pool_alloc() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/

[PATCH linux-next] drm/amd/pm: Remove unneeded result variable

2022-09-19 Thread cgel . zte
From: ye xingchen Return the value atomctrl_initialize_mc_reg_table_v2_2() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/gpu/drm/amd/pm/powerplay/smumgr/polaris10_smumgr.c | 4 +--- 1 file changed, 1 insertion(+),

[PATCH linux-next] drm/amd/pm: Remove the unneeded result variable

2022-09-19 Thread cgel . zte
From: ye xingchen Return the value append_vbios_pptable() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- .../gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-)

[PATCH V2] drm: bridge/dw-hdmi-ahb-audio: use strscpy() is more robust and safer

2022-09-19 Thread cgel . zte
From: Minghao Chi The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL terminated strings. Signed-off-by: Minghao Chi --- v1->v2 using DRIVER_NAME instead of "DW-HDMI". drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c | 6 +++--- 1 file chang

[PATCH] drm: bridge/dw-hdmi-ahb-audio: use strscpy() is more robust and safer

2022-09-18 Thread cgel . zte
From: Minghao Chi The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL terminated strings. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH] dma-buf: use strscpy() is more robust and safer

2022-09-15 Thread cgel . zte
From: Minghao Chi The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL terminated strings. Signed-off-by: Minghao Chi --- drivers/dma-buf/dma-buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma-buf/dma-buf.c b/d

[PATCH linux-next] drm/amd/display/amdgpu_dm: remove duplicate included header files

2022-09-11 Thread cgel . zte
From: Xu Panda soc15_common.h is included more than once. Reported-by: Zeal Robot Signed-off-by: Xu Panda --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display

[PATCH linux-next] drm/vmwgfx: Remove the unneeded result variable

2022-09-06 Thread cgel . zte
From: ye xingchen Return the value vmw_cotable_notify() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/driv

[PATCH linux-next] drm/i915: Remove the unneeded result variables

2022-09-02 Thread cgel . zte
From: zhang songyi Return the mul_u32_fixed16() and div_fixed16() directly instead of redundant variables. Reported-by: Zeal Robot Signed-off-by: zhang songyi --- drivers/gpu/drm/i915/intel_pm.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915

[PATCH linux-next] drm/dp_helper: Remove the unneeded result variable

2022-09-02 Thread cgel . zte
From: zhang songyi Return the drm_dp_dpcd_writeb() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: zhang songyi --- drivers/gpu/drm/display/drm_dp_helper.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/

[PATCH linux-next] drm/amdgpu: Remove the unneeded result variable

2022-09-02 Thread cgel . zte
From: zhang songyi Return the sdma_v6_0_start() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: zhang songyi --- drivers/gpu/drm/amd/amdgpu/sdma_v6_0.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/

[PATCH linux-next] drm/amd/display: Remove the unneeded result variable

2022-09-02 Thread cgel . zte
From: zhang songyi Return the enable_link_dp() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: zhang songyi --- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/g

[PATCH linux-next] drm/radeon: Remove the unneeded result variable

2022-09-02 Thread cgel . zte
From: ye xingchen Return the value radeon_drm_ioctl() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/gpu/drm/radeon/radeon_drv.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/dr

[PATCH linux-next] drm/radeon/ci_dpm: Remove the unneeded result variable

2022-09-02 Thread cgel . zte
From: ye xingchen Return the value ci_load_smc_ucode() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/gpu/drm/radeon/ci_dpm.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm

[PATCH linux-next] drm/gem: Remove the unneeded result variable

2022-08-30 Thread cgel . zte
From: ye xingchen Return the value drm_gem_handle_delete() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/gpu/drm/drm_gem.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm

[PATCH linux-next] drm/amdgpu: Remove the unneeded result variable 'r'

2022-08-30 Thread cgel . zte
From: ye xingchen Return the value sdma_v4_0_start() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/

[PATCH linux-next] drm/amdkfd: remove redundant variables err and ret

2022-08-29 Thread cgel . zte
From: Jinpeng Cui Return value from kfd_wait_on_events() and io_remap_pfn_range() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: Jinpeng Cui --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 9 ++--- 1 file changed, 2 insertions(+), 7 de

[PATCH linux-next] drm/amd/display: remove redundant vertical_line_start variable

2022-08-29 Thread cgel . zte
From: Jinpeng Cui Return value from expression directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: Jinpeng Cui --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[PATCH linux-next] drm/msm/dsi: Remove the unneeded result variable

2022-08-26 Thread cgel . zte
From: ye xingchen Return the value msm_dsi_phy_enable() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/gpu/drm/msm/dsi/dsi_manager.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gp

[PATCH linux-next] drm/amdgpu: Remove the unneeded result variable

2022-08-26 Thread cgel . zte
From: ye xingchen Return the value sdma_v5_2_start() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/

[PATCH linux-next] drm/bridge: parade-ps8622: Remove the unneeded result variable

2022-08-25 Thread cgel . zte
From: ye xingchen Return the value ps8622_set() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/gpu/drm/bridge/parade-ps8622.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm

[PATCH linux-next v2] drm/mediatek: Remove the unneeded result

2022-08-25 Thread cgel . zte
From: ye xingchen Return the value drm_mode_config_helper_suspend() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- v1 -> v2 Add all the mailinglists that get_maintainers.pl give. drivers/gpu/drm/mediatek/mtk_drm_drv.c | 5

[PATCH linux-next] drm/omap: dmm_tiler:Remove the print function dev_err()

2022-08-09 Thread cgel . zte
From: ye xingchen >From the coccinelle check: ./drivers/gpu/drm/omapdrm/omap_dmm_tiler.c Error:line 817 is redundant because platform_get_irq() already prints an error So,remove the unnecessary print function dev_err() Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/gpu/drm/o

[PATCH linux-next] drm/bridge: anx7625: Remove redundant 'flush_workqueue()' calls 'destroy_workqueue()' already drains the queue before destroying it, so there is no need to flush it explicitly.So, r

2022-07-21 Thread cgel . zte
From: ye xingchen Reported-by: Zeal Robot Signed-off-by: ye xingchen --- drivers/gpu/drm/bridge/analogix/anx7625.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index d1f1d525aeb6..732647beb2ef 100644 --

[PATCH] drm/tegra: Remove redundant NULL check before kfree

2022-06-02 Thread cgel . zte
From: Minghao Chi kfree on NULL pointer is a no-op. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/tegra/submit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tegra/submit.c b/drivers/gpu/drm/tegra/submit.c index 6d6dd8c35475..5

[PATCH] drm/amdgpu: simplify the return expression of vega10_ih_hw_init()

2022-05-04 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c b/drivers/gpu/drm/amd/amdgpu/vega10

[PATCH] drm: simplify the return expression of ast_drm_resume()

2022-05-04 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/ast/ast_drv.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_drv.c b/drivers/gpu/drm/ast/ast_drv.c index 7465c4f0156a..76

[PATCH] drm/i915: simplify the return expression of i915_driver_open()

2022-05-04 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/i915/i915_driver.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index

[PATCH] drm/amdgpu: simplify the return expression

2022-05-04 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdg

[PATCH] drm/nouveau: simplify the return expression of nouveau_debugfs_init()

2022-04-29 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_debugfs.c b/drivers/gpu/drm/nouveau/no

[PATCH] drm: omapdrm: simplify the return expression of dss_setup_default_clock()

2022-04-29 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/omapdrm/dss/dss.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b/drivers/gpu/drm/omapdrm/dss/dss.c index 039

[PATCH] drm/vc4: simplify the return expression of vc4_grab_bin_bo()

2022-04-29 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/vc4/vc4_bo.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c index e451cc5bcfac..49c0

[PATCH] omapdss: HDMI: simplify the return expression of hdmi_init_pll_data()

2022-04-29 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/omapdrm/dss/hdmi_pll.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi_pll.c b/drivers/gpu/drm/omapdrm/dss/hdmi_

[PATCH] drm/bridge: simplify the return expression of ps8640_bridge_host_attach

2022-04-28 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/bridge/parade-ps8640.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8

[PATCH] omapfb: simplify the return expression of nec_8048_connect()

2022-04-28 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- .../fbdev/omap2/omapfb/displays/panel-nec-nl8048hl11.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-nec-nl8

[PATCH] drm/amdgpu: simplify the return expression of navi10_ih_hw_init()

2022-04-28 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/amd/amdgpu/navi10_ih.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/navi10_ih.c b/drivers/gpu/drm/amd/amdgpu/navi10

[PATCH] drm/vc4: simplify the return expression of vc4_prepare_fb()

2022-04-28 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/vc4/vc4_plane.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c index 920a9eefe4

[PATCH] drm/virtio: simplify the return expression

2022-04-28 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/virtio/virtgpu_prime.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_prime.c b/drivers/gpu/drm/virtio/virtgpu_pri

[PATCH] drm/amdgpu: simplify the return expression of iceland_ih_hw_init

2022-04-28 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/iceland_ih.c b/drivers/gpu/drm/amd/amdgpu/icel

[PATCH] omapfb: simplify the return expression of dsi_init_pll_data()

2022-04-28 Thread cgel . zte
From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c b/drivers/video/

[PATCH] drm/msm/hdmi: fix error check return value of irq_of_parse_and_map()

2022-04-25 Thread cgel . zte
From: Lv Ruyi The irq_of_parse_and_map() function returns 0 on failure, and does not return a negative value anyhow, so never enter this conditional branch. Fixes: f6a8eaca0ea1 ("drm/msm/mdp5: use irqdomains") Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- drivers/gpu/drm/msm/hdmi/hdmi.c

[PATCH] drm/msm/dpu: fix error check return value of irq_of_parse_and_map()

2022-04-25 Thread cgel . zte
From: Lv Ruyi The irq_of_parse_and_map() function returns 0 on failure, and does not return a negative value anyhow, so never enter this conditional branch. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- drivers/gpu/drm/msm/disp/dpu1

[PATCH v2] drm/msm/dp: fix error check return value of irq_of_parse_and_map()

2022-04-23 Thread cgel . zte
From: Lv Ruyi The irq_of_parse_and_map() function returns 0 on failure, and does not return an negative value. Fixes: 8ede2ecc3e5e ("drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets") Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- v2: don't print rc, and return -EINVAL rather th

[PATCH v2] drm: msm: fix error check return value of irq_of_parse_and_map()

2022-04-23 Thread cgel . zte
From: Lv Ruyi The irq_of_parse_and_map() function returns 0 on failure, and does not return an negative value. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- v2: don't print irq, and return ERR_PTR(-EINVAL) --- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 6 +++--- 1 file changed, 3 inserti

[PATCH] drm: msm: fix error check return value of irq_of_parse_and_map()

2022-04-22 Thread cgel . zte
From: Lv Ruyi The irq_of_parse_and_map() function returns 0 on failure, and does not return an negative value. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/di

[PATCH] drm/msm/dp: fix error check return value of irq_of_parse_and_map()

2022-04-22 Thread cgel . zte
From: Lv Ruyi The irq_of_parse_and_map() function returns 0 on failure, and does not return an negative value. Fixes: 8ede2ecc3e5e ("drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets") Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- drivers/gpu/drm/msm/dp/dp_display.c | 2 +- 1

[PATCH] drm/tegra: Make use of the helper function devm_platform_ioremap_resource()

2022-04-21 Thread cgel . zte
From: Lv Ruyi Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately.Make the code simpler without functional changes. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- drivers/gpu/drm/tegra/vic.c | 9 + 1 fil

[PATCH] drm/etnaviv: using pm_runtime_resume_and_get instead of pm_runtime_get_sync

2022-04-19 Thread cgel . zte
From: Minghao Chi Using pm_runtime_resume_and_get() to replace pm_runtime_get_sync and pm_runtime_put_noidle. This change is just to simplify the code, no actual functional changes. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 6 ++ 1 file

[PATCH] drm/bridge: anx7625: remove unnecessary flush_workqueue()

2022-04-08 Thread cgel . zte
From: Lv Ruyi All work currently pending will be done by calling destroy_workqueue, so there is unnecessary to flush it explicitly. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- drivers/gpu/drm/bridge/analogix/anx7625.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/b

[PATCH] drivers: Fix spelling mistake "writting" -> "writing"

2022-04-08 Thread cgel . zte
From: Lv Ruyi There are some spelling mistakes in the comments. Fix it. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- drivers/gpu/drm/i915/i915_request.c | 2 +- drivers/net/ethernet/sfc/mcdi_pcol.h

[PATCH] video: fbdev: Fix missing of_node_put in imxfb_probe

2022-04-07 Thread cgel . zte
From: Lv Ruyi of_parse_phandle returns node pointer with refcount incremented, use of_node_put() on it when done. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- drivers/video/fbdev/imxfb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fb

[PATCH] drm/amd/dc:: remove duplicate include

2022-04-06 Thread cgel . zte
From: Lv Ruyi 'dm_services.h' included in 'freesync,c' is duplicated, so remove one. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/modules/freesync/frees

[PATCH] drm: tegra: fix memory leak in error handling path

2022-03-29 Thread cgel . zte
From: Lv Ruyi Before leave the nvdec_load_firmware, we shuold free virt which is alloced by dma_alloc_coherent, so change "return err" to "goto cleanup". Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- drivers/gpu/drm/tegra/nvdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[PATCH] drm: msm: add null pointer check

2022-03-29 Thread cgel . zte
From: Lv Ruyi kzalloc is a memory allocation function which can return NULL when some internal memory errors happen. Add null pointer check to avoid dereferencing null pointer. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- drivers/gpu/drm/msm/disp/msm_disp_snapshot_util.c | 2 ++ 1 file

[PATCH] drm/i915/vlv_dsi_pll: use min_t() to make code cleaner

2022-03-08 Thread cgel . zte
From: Changcheng Deng Use min_t() in order to make code cleaner. Reported-by: Zeal Robot Signed-off-by: Changcheng Deng --- drivers/gpu/drm/i915/display/vlv_dsi_pll.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/display/vlv_dsi_pll.c b/drivers/

[PATCH] drm/armada: Use of_device_get_match_data()

2022-02-20 Thread cgel . zte
From: Minghao Chi (CGEL ZTE) Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot Signed-off-by: Minghao Chi (CGEL ZTE) --- drivers/gpu/drm/armada/armada_crtc.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/armada

[PATCH] drm/amdkfd: Replace one-element array with flexible-array member

2022-02-17 Thread cgel . zte
From: Changcheng Deng There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use "flexible array members" for these cases. The older style of one-element or zero-length arrays should no longer

[PATCH] drm/amdkfd: Replace zero-length array with flexible-array member

2022-02-15 Thread cgel . zte
From: Changcheng Deng There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use "flexible array members" for these cases. The older style of one-element or zero-length arrays should no longer

[PATCH] drm/vc4: Use of_device_get_match_data()

2022-02-13 Thread cgel . zte
From: "Minghao Chi (CGEL ZTE)" Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot Signed-off-by: Minghao Chi (CGEL ZTE) --- drivers/gpu/drm/vc4/vc4_dsi.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vc4/v

[PATCH] drm/aspeed: Use of_device_get_match_data()

2022-02-13 Thread cgel . zte
From: "Minghao Chi (CGEL ZTE)" Use of_device_get_match_data() to simplify the code. Reported-by: Zeal Robot Signed-off-by: Minghao Chi (CGEL ZTE) --- drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/

[PATCH] fbcon: use min() to make code cleaner

2022-02-09 Thread cgel . zte
From: Changcheng Deng Use min() in order to make code cleaner. Reported-by: Zeal Robot Signed-off-by: Changcheng Deng --- drivers/video/fbdev/core/fbcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c in

[PATCH] drm/amd/pm: remove duplicate include in 'arcturus_ppt.c'

2022-01-27 Thread cgel . zte
From: Changcheng Deng 'amdgpu_dpm.h' included in 'arcturus_ppt.c' is duplicated. Reported-by: Zeal Robot Signed-off-by: Changcheng Deng --- drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c b

[PATCH] drm/amdgpu: remove duplicate include in 'amdgpu_device.c'

2022-01-27 Thread cgel . zte
From: Changcheng Deng 'linux/pci.h' included in 'amdgpu_device.c' is duplicated. Reported-by: Zeal Robot Signed-off-by: Changcheng Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/d

[PATCH] amdgpu/amdgpu_psp: remove unneeded ret variable

2022-01-17 Thread cgel . zte
From: Minghao Chi Return value from amdgpu_bo_create_kernel() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: CGEL ZTE --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 +- 1 file changed, 1 insertion(+), 5

[PATCH] vmwgfx: remove redundant ret variable

2022-01-17 Thread cgel . zte
From: Minghao Chi Return value directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: CGEL ZTE --- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff

[PATCH] drm/amdgpu: remove duplicate include

2022-01-14 Thread cgel . zte
From: Changcheng Deng 'drm/drm_drv.h' included in 'amdgpu_ttm.c' is duplicated. It is also included on 53 line. Reported-by: Zeal Robot Signed-off-by: Changcheng Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amd

[PATCH] drm/amd/pm: Replace one-element array with flexible-array member

2022-01-14 Thread cgel . zte
From: Changcheng Deng There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use "flexible array members" for these cases. The older style of one-element or zero-length arrays should no longer

[PATCH] drm/gma500: remove redundant ret variable

2022-01-12 Thread cgel . zte
From: Minghao Chi Return value directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: CGEL ZTE --- drivers/gpu/drm/gma500/cdv_intel_dp.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a

[PATCH] drm/vmwgfx: remove redundant ret variable

2022-01-12 Thread cgel . zte
From: Minghao Chi Return value from vmw_gem_object_create_with_handle() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: CGEL ZTE --- drivers/gpu/drm/vmwgfx/vmwgfx_bo.c | 6 +- 1 file changed, 1 insertion

[PATCH] drivers/video: remove redundant res variable

2022-01-04 Thread cgel . zte
From: Minghao Chi Return value from aty_ld_8() directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: CGEL ZTE --- drivers/video/fbdev/aty/mach64_ct.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[PATCH] drm/msm: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE

2021-12-21 Thread cgel . zte
From: Changcheng Deng Fix the following coccicheck warning: ./drivers/gpu/drm/msm/msm_debugfs.c: 132: 0-23: WARNING: shrink_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE for debugfs files. Reported-by: Zeal Robot Signed-of

[PATCH] drm/msm/dp: remove unneeded variable

2021-12-15 Thread cgel . zte
From: Changcheng Deng Remove unneeded variable used to store return value. Reported-by: Zeal Robot Signed-off-by: Changcheng Deng --- drivers/gpu/drm/msm/dp/dp_display.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/dr

[PATCH] drm/amdkfd: use max() and min() to make code cleaner

2021-12-15 Thread cgel . zte
From: Changcheng Deng Use max() and min() in order to make code cleaner. Reported-by: Zeal Robot Signed-off-by: Changcheng Deng --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/

[PATCH] drm:amdgpu:remove unneeded variable

2021-12-09 Thread cgel . zte
From: chiminghao return value form directly instead of taking this in another redundant variable. Reported-by: Zeal Robot Signed-off-by: chiminghao --- drivers/gpu/drm/amd/amdgpu/amdgpu_ioc32.c | 5 + drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 6 ++ 2 files changed, 3 insertions(+),

[PATCH linux-next] drm/i915/display: Remove the useless variable offset and its assignment

2021-12-07 Thread cgel . zte
From: luo penghao The existence of offset is meaningless, so it should be deleted. The clang_analyzer complains as follows: Value stored to 'offset' is never read Reported-by: Zeal Robot Signed-off-by: luo penghao --- drivers/gpu/drm/i915/display/i9xx_plane.c | 8 1 file changed, 4

[PATCH linux-next] drm/i915/display: Delete redundant post_mask assignment

2021-12-07 Thread cgel . zte
From: luo penghao This value will be overwritten by the following if statement, even if the if is not executed, the value will not be used The clang_analyzer complains as follows: Value stored to 'port_mask' is never read Reported-by: Zeal Robot Signed-off-by: luo penghao --- drivers/gpu/dr

[PATCH] drm/i915/dmabuf: remove duplicate include in i915_gem_dmabuf.c

2021-11-23 Thread cgel . zte
From: Yao Jing 'asm/smp.h' included in 'drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c' is duplicated. It is clearly included on the 12 line. Reported-by: Zeal Robot Signed-off-by: Yao Jing --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) di

[PATCH] drm/amd/display: fix application of sizeof to pointer

2021-11-23 Thread cgel . zte
From: Lv Ruyi Both of split and merge are pointers, not arrays. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- drivers/gpu/drm/amd/display/dc/dml/dml_wrapper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dml/dml_wrapper.c b/drive

[PATCH linux-next] drm/i915/request: Remove unused variables

2021-11-21 Thread cgel . zte
From: yong yiran The clang_analyzer complains as follows: drivers/gpu/drm/i915/i915_request.c:2119:2 warning: Value stored to 'x' is never read Reported-by: Zeal Robot Signed-off-by: yong yiran --- drivers/gpu/drm/i915/i915_request.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drive

[PATCH] drm/amd/display: fix cond_no_effect.cocci warnings

2021-11-11 Thread cgel . zte
From: Ye Guojin This was found by coccicheck: ./drivers/gpu/drm/amd/display/dc/core/dc_resource.c, 2516, 7-9, WARNING possible condition with no effect (if == else) hdmi_info.bits.YQ0_YQ1 is always YYC_QUANTIZATION_LIMITED_RANGE. Reported-by: Zeal Robot Signed-off-by: Ye Guojin --- drivers/g

[PATCH] drivers:gpu: remove unneeded variable

2021-11-11 Thread cgel . zte
From: chiminghao Fix the following coccicheck REVIEW: ./drivers/gpu/drm/tegra/dpaux.c:282:13-16 REVIEW Unneeded variable Reported-by: Zeal Robot Signed-off-by: chiminghao --- drivers/gpu/drm/tegra/dpaux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/te

[PATCH] fs:btrfs: remove unneeded variable

2021-11-11 Thread cgel . zte
From: chiminghao Fix the following coccicheck REVIEW: ./fs/btrfs/extent_map.c:299:5-8 REVIEW Unneeded variable Reported-by: Zeal Robot Signed-off-by: chiminghao --- fs/btrfs/extent_map.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/ext

[PATCH linux-next] drm/msm/dp: remove unneeded variable

2021-11-10 Thread cgel . zte
From: Changcheng Deng Fix the following coccicheck review: ./drivers/gpu/drm/msm/dp/dp_debug.c: Unneeded variable Remove unneeded variable used to store return value. Reported-by: Zeal Robot Signed-off-by: Changcheng Deng --- drivers/gpu/drm/msm/dp/dp_debug.c | 3 +-- 1 file changed, 1 inser

[PATCH] drm/amdgpu: remove unneeded variable

2021-11-09 Thread cgel . zte
From: ran jianping Fix the following coccicheck review: ./drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c:1174:14-18 :Unneeded variable Remove unneeded variable used to store return value. Reported-by: Zeal Robot Signed-off-by: ran jianping --- drivers/gpu/drm/amd/pm/swsmu/smu11/sien

[PATCH] omapfb: panel-tpo-td043mtea1: Replace snprintf in show functions with sysfs_emit

2021-11-05 Thread cgel . zte
From: Jing Yao coccicheck complains about the use of snprintf() in sysfs show functions: WARNING use scnprintf or sprintf Use sysfs_emit instead of scnprintf, snprintf or sprintf makes more sense. Reported-by: Zeal Robot Signed-off-by: Jing Yao --- .../video/fbdev/omap2/omapfb/displays/panel

[PATCH] omapfb: panel-dsi-cm: Replace snprintf in show functions with sysfs_emit

2021-11-05 Thread cgel . zte
From: Jing Yao coccicheck complains about the use of snprintf() in sysfs show functions: WARNING use scnprintf or sprintf Use sysfs_emit instead of scnprintf, snprintf or sprintf makes more sense. Reported-by: Zeal Robot Signed-off-by: Jing Yao --- drivers/video/fbdev/omap2/omapfb/displays/p

[PATCH] video: udlfb: replace snprintf in show functions with sysfs_emit

2021-11-04 Thread cgel . zte
From: Jing Yao coccicheck complains about the use of snprintf() in sysfs show functions: WARNING use scnprintf or sprintf Use sysfs_emit instead of scnprintf, snprintf or sprintf makes more sense. Reported-by: Zeal Robot Signed-off-by: Jing Yao --- drivers/video/fbdev/udlfb.c | 8 1

[PATCH] drm/amd/display: remove unnecessary conditional operators

2021-11-02 Thread cgel . zte
From: Ye Guojin Since the variables named is_end_of_payload and hpd_status are already bool type, the ?: conditional operator is unnecessary any more. Clean them up here. Reported-by: Zeal Robot Signed-off-by: Ye Guojin --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- drivers/g

[PATCH l] fbdev: fbmem: use swap() to make code cleaner

2021-10-28 Thread cgel . zte
From: Changcheng Deng Use swap() in order to make code cleaner. Issue found by coccinelle. Reported-by: Zeal Robot Signed-off-by: Changcheng Deng --- drivers/video/fbdev/core/fbmem.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/core/fbmem.c b

[PATCH mm] remove duplicate include in nouveau_dmem.c

2021-10-19 Thread cgel . zte
From: Ran Jianping 'nvif/if000c.h' included in 'drivers/gpu/drm/nouveau/nouveau_dmem.c' is duplicated.It is also included on the 36 line. Reported-by: Zeal Robot Signed-off-by: Ran Jianping --- drivers/gpu/drm/nouveau/nouveau_dmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/

[PATCH] remove duplicate include in mock_region.c

2021-10-19 Thread cgel . zte
From: Ran Jianping 'drm/ttm/ttm_placement.h' included in 'drivers/gpu/drm/i915/selftests/mock_region.c' is duplicated. It is also included on the 9 line. Reported-by: Zeal Robot Signed-off-by: Ran Jianping --- drivers/gpu/drm/i915/selftests/mock_region.c | 2 -- 1 file changed, 2 deletions(-)

[PATCH] drm/amd/display: remove duplicate include in dcn201_clk_mgr.c

2021-10-08 Thread cgel . zte
From: Lv Ruyi Remove all but the first include of reg_helper.h and core_types.h from dcn201_clk_mgr.c. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi --- .../gpu/drm/amd/display/dc/clk_mgr/dcn201/dcn201_clk_mgr.c| 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/disp

[PATCH] drm/msm: remove unneeded variable

2021-08-31 Thread cgel . zte
From: Chi Minghao Fix the following coccicheck REVIEW: ./drivers/gpu/drm/msm/edp/edp_ctrl.c:1245:5-8 Unneeded variable Reported-by: Zeal Robot Signed-off-by: Chi Minghao --- drivers/gpu/drm/msm/edp/edp_ctrl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/d