[PATCH -next] fbdev: convert list_for_each to entry variant

2021-06-08 Thread Zou Wei
convert list_for_each() to list_for_each_entry() where applicable. Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/video/fbdev/core/fbsysfs.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/core/fbsysfs.c b/drivers/video/fbdev/core

[PATCH -next] drm/bridge: lt8912b: fix platform_no_drv_owner.cocci warnings

2021-05-27 Thread Zou Wei
./drivers/gpu/drm/bridge/lontium-lt8912b.c:758:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers

[PATCH -next] drm/bridge: cdns: Fix PM reference leak in cdns_dsi_transfer()

2021-05-24 Thread Zou Wei
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm

[PATCH -next] drm/vc4: hdmi: Fix PM reference leak in vc4_hdmi_encoder_pre_crtc_co()

2021-05-24 Thread Zou Wei
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm/vc4

[PATCH -next] drm: Fix PM reference leak

2021-05-21 Thread Zou Wei
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm

[PATCH -next] drm: Fix missing unlock and free on error in drm_legacy_addbufs_pci()

2021-05-18 Thread Zou Wei
Add the missing unlock and free before return from function drm_legacy_addbufs_pci() in the error handling case. Fixes: 70556e24e18e ("drm: remove usage of drm_pci_alloc/free") Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm/drm_bufs.c | 10 +- 1 file

[PATCH -next] drm/aperture: Fix missing unlock on error in devm_aperture_acquire()

2021-05-13 Thread Zou Wei
Add the missing unlock before return from function devm_aperture_acquire() in the error handling case. Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm/drm_aperture.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_aperture.c b

[PATCH -next] drm/bridge: lt9611: Add missing MODULE_DEVICE_TABLE

2021-05-11 Thread Zou Wei
This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm/bridge/lontium-lt9611.c | 1 + 1 file changed, 1 insertion

[PATCH -next] drm/panfrost: Fix PM reference leak in panfrost_job_hw_submit()

2021-05-10 Thread Zou Wei
pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm

[PATCH -next] drm/vmwgfx/vmwgfx_validation: Use flexible-array member instead of zero-length array

2021-03-23 Thread Zou Wei
Suppresses the following coccinelle warning: drivers/gpu/drm/vmwgfx/vmwgfx_validation.c:85:15-22: WARNING use flexible-array member instead Signed-off-by: Zou Wei --- drivers/gpu/drm/vmwgfx/vmwgfx_validation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH -next] drm/nouveau/core/client: Mark nvkm_uclient_sclass with static keyword

2021-03-23 Thread Zou Wei
Fix the following sparse warning: drivers/gpu/drm/nouveau/nvkm/core/client.c:64:1: warning: symbol 'nvkm_uclient_sclass' was not declared. Should it be static? Signed-off-by: Zou Wei --- drivers/gpu/drm/nouveau/nvkm/core/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH -next] drm: Markdrm_send_event_helper with static keyword

2021-03-23 Thread Zou Wei
Fix the following sparse warning: drivers/gpu/drm/drm_file.c:789:6: warning: symbol 'drm_send_event_helper' was not declared. Should it be static? Signed-off-by: Zou Wei --- drivers/gpu/drm/drm_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drive

[PATCH -next] phy: mediatek: Mark mtk_mipi_tx_driver with static keyword

2021-01-11 Thread Zou Wei
Fix the following sparse warning: drivers/phy/mediatek/phy-mtk-mipi-dsi.c:237:24: warning: symbol 'mtk_mipi_tx_driver' was not declared. Should it be static? Signed-off-by: Zou Wei --- drivers/phy/mediatek/phy-mtk-mipi-dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH -next] drm/virtio: Make virtgpu_dmabuf_ops with static keyword

2020-11-15 Thread Zou Wei
Fix the following sparse warning: ./virtgpu_prime.c:46:33: warning: symbol 'virtgpu_dmabuf_ops' was not declared. Should it be static? Signed-off-by: Zou Wei --- drivers/gpu/drm/virtio/virtgpu_prime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/

[PATCH -next] drm/nouveu: remove unused variable

2020-11-02 Thread Zou Wei
device *dev; ^~~ Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 8133377..96f00b5 100644 --- a/drivers

[PATCH -next] drm/amd/pm: remove unused variable

2020-11-02 Thread Zou Wei
Fix variable set but not used compilation warning: ./vangogh_ppt.c:397:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] int ret = 0; ^~~ Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 2 -- 1 file changed

[PATCH -next] drm/panfrost: Fix unused variable warning

2020-11-02 Thread Zou Wei
Fixes the following W=1 kernel build warning: ./panfrost_job.c:617:28: warning: unused variable ‘js’ [-Wunused-variable] struct panfrost_job_slot *js = pfdev->js; ^~ Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm/panfrost/panfrost_job.c

[PATCH -next] drm/amdgpu/swsmu: Remove unused static struct 'navi10_i2c_algo'

2020-10-30 Thread Zou Wei
= { ^~~ Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c index ef1a62e..bec63f2 100644 --- a

[PATCH -next] dma-buf: heaps: Make sys_heap static

2020-10-30 Thread Zou Wei
Fix the following sparse warning: drivers/dma-buf/heaps/system_heap.c:23:17: warning: symbol 'sys_heap' was not declared. Should it be static? sys_heap has only call within system_heap.c It should be static Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/dma

[PATCH -next] drm/amd/display: remove useless if/else

2020-10-29 Thread Zou Wei
es in dce_calcs.c") Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c b/drivers/gpu/drm/amd/display/dc/calcs/d

[PATCH -next] drm/i915: Remove unused variable ret

2020-10-29 Thread Zou Wei
This patch fixes below warnings reported by coccicheck ./drivers/gpu/drm/i915/i915_debugfs.c:789:5-8: Unneeded variable: "ret". Return "0" on line 1012 Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm/i915/i915_debugfs.c | 3 +-- 1 file changed, 1 inser

[PATCH -next] drm/tilcdc: fix platform_no_drv_owner.cocci warnings

2020-10-28 Thread Zou Wei
s (v5)") Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c index 00efc30..4235780 100644 --- a/drivers/gpu/drm/tilcdc/tilc

[PATCH -next] dma-buf: heaps: Remove unused variable ret

2020-09-23 Thread Zou Wei
This patch fixes below warnings reported by coccicheck ./drivers/dma-buf/heaps/heap-helpers.c:202:5-8: Unneeded variable: "ret". Return "0" on line 215 Signed-off-by: Zou Wei --- drivers/dma-buf/heaps/heap-helpers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

[PATCH -next] drm/udl: Make udl_handle_damage static

2020-05-01 Thread Zou Wei
Fix the following sparse warning: drivers/gpu/drm/udl/udl_modeset.c:269:5: warning: symbol 'udl_handle_damage' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm/udl/udl_modeset.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH -next] drm/amd/display: Fix unsigned comparison to zero

2020-04-30 Thread Zou Wei
Fixes coccicheck warning: drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c:1398:60-61: WARNING: Unsigned expression compared with zero: j >= 0 Fixes: 238387774232 ("drm/amd/display: fix rn soc bb update") Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm/a

[PATCH -next] drm/amdgpu: Fix warning Comparison to bool

2020-04-30 Thread Zou Wei
fix below warnings reported by coccicheck drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:630:5-11: WARNING: Comparison to bool Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH -next] drm/dp_mst: use false for bool variable

2020-04-30 Thread Zou Wei
Fixes coccicheck warning: drivers/gpu/drm/drm_dp_mst_topology.c:2229:6-13: WARNING: Assignment of 0/1 to bool variable Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm/drm_dp_mst_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH -next] drm/nouveau/acr: Use kmemdup instead of kmalloc and memcpy

2020-04-21 Thread Zou Wei
cure boot"") Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/