[PATCH] drm/amd/display: remove repeated includes

2022-07-06 Thread Guo Zhengkui
Remove a repeated "#include " Signed-off-by: Guo Zhengkui --- drivers/gpu/drm/amd/display/dc/os_types.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/os_types.h b/drivers/gpu/drm/amd/display/dc/os_types.h index 795dd486b6d6..6b88ae14f1f9 10

[PATCH] drm/nouveau/tegra: remove needless NULL check

2022-05-19 Thread Guo Zhengkui
There has already been NULL check in clk_prepare_enable() and clk_disable_unprepare(), so remove needless NULL check before calling them. Signed-off-by: Guo Zhengkui --- drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff

[PATCH] drm: mxsfb: remove unnecessary NULL check before clk_disable_unprepare()

2022-05-17 Thread Guo Zhengkui
NULL check has been done in clk_disable_unprepare() by IS_ERR_OR_NULL(). So remove NULL check before it. Signed-off-by: Guo Zhengkui --- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 3 +-- drivers/gpu/drm/mxsfb/mxsfb_kms.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH] drm: omapdrm: dss: replace ternary operator with max()

2022-05-16 Thread Guo Zhengkui
Fix the following coccicheck warning: drivers/gpu/drm/omapdrm/dss/dispc.c:2454:21-22: WARNING opportunity for max() Signed-off-by: Guo Zhengkui --- drivers/gpu/drm/omapdrm/dss/dispc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b

[PATCH] drm/nouveau/devinit: fix returnvar.cocci warnings

2022-05-04 Thread Guo Zhengkui
uot; on line 44. drivers/gpu/drm/nouveau/nvkm/subdev/devinit/g98.c:35:5-12: Unneeded variable: "disable". Return "0ULL" on line 50. Signed-off-by: Guo Zhengkui --- drivers/gpu/drm/nouveau/nvkm/subdev/devinit/g98.c | 3 +-- drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c

[PATCH] drm/i915: fix returnvar.cocci warning

2022-04-25 Thread Guo Zhengkui
Fix the following coccicheck warning: drivers/gpu/drm/i915/display/intel_pipe_crc.c:82:5-8: Unneeded variable: "ret". Return "0" on line 125. Signed-off-by: Guo Zhengkui --- drivers/gpu/drm/i915/display/intel_pipe_crc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deleti

[PATCH] drm/msm: fix returnvar.cocci warning

2022-04-25 Thread Guo Zhengkui
Fix the following coccicheck warning: drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c:24:5-8: Unneeded variable: "ret". Return "0" on line 75. Signed-off-by: Guo Zhengkui --- drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --g

[PATCH] drm/nouveau: fix returnvar.cocci warning

2022-04-25 Thread Guo Zhengkui
Fix the following coccicheck warning: drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c:71:5-12: Unneeded variable: "disable". Return "0ULL" on line 85. Signed-off-by: Guo Zhengkui --- drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gt215.c | 3 +-- 1 file changed, 1 inser

[PATCH] drm/amd/display: fix if == else warning

2022-04-24 Thread Guo Zhengkui
Fix the following coccicheck warning: drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c:98:8-10: WARNING: possible condition with no effect (if == else) Signed-off-by: Guo Zhengkui --- drivers/gpu/drm/amd/display/dc/dcn201/dcn201_hwseq.c | 2 -- 1 file changed, 2 deletions(-) diff --git a

[PATCH] drm/radeon: simplify if-if to if-else

2022-03-31 Thread Guo Zhengkui
Replace `if (!ret)` with `else` for simplification. Signed-off-by: Guo Zhengkui --- drivers/gpu/drm/radeon/radeon_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index c67b6ddb29a4..e765abcb3b01

[PATCH] drm/nouveau/instmem: fix uninitialized_var.cocci warning

2022-02-28 Thread Guo Zhengkui
) 8.3.0. The patch which removed uninitialized_var() is: https://lore.kernel.org/all/20121028102007.ga7...@gmail.com/ And there is very few "/* GCC */" comments in the Linux kernel code now. Signed-off-by: Guo Zhengkui --- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/nv50.c | 2 +- 1 file

[PATCH] video: omapfb: Use sysfs_emit() instead of snprintf()

2021-11-18 Thread Guo Zhengkui
Use sysfs_emit() instead of snprintf(). Signed-off-by: Guo Zhengkui --- drivers/video/fbdev/omap/omapfb_main.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c index b495c09e6102

[PATCH] video: omapfb: Use scnprintf() instead of snprintf()

2021-11-17 Thread Guo Zhengkui
Fix following warnings: ./drivers/video/fbdev/omap/omapfb_main.c:1382:8-16: WARNING: use scnprintf or sprintf ./drivers/video/fbdev/omap/omapfb_main.c:1306:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Guo Zhengkui --- drivers/video/fbdev/omap/omapfb_main.c | 8 1 file changed

[PATCH] video: omapfb: Use scnprintf() instead of snprintf()

2021-11-17 Thread Guo Zhengkui
Fix following warnings: ./drivers/video/fbdev/omap/omapfb_main.c:1382:8-16: WARNING: use scnprintf or sprintf ./drivers/video/fbdev/omap/omapfb_main.c:1306:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Guo Zhengkui --- drivers/video/fbdev/omap/omapfb_main.c | 8 1 file changed

[PATCH] drm/amdgpu: remove some repeated includings

2021-10-01 Thread Guo Zhengkui
Remove two repeated includings in line 46 and 47. Signed-off-by: Guo Zhengkui --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c index 291a47f7992a

[PATCH] drm/amdgpu: fix some repeated includings

2021-09-30 Thread Guo Zhengkui
Remove two repeated includings in line 62 and 63. Signed-off-by: Guo Zhengkui --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c index 291a47f7992a

[PATCH] drm/msm: remove a repeated including of

2021-07-28 Thread Guo Zhengkui
Remove a repeated "#include " in line 19 of the original file. Signed-off-by: Guo Zhengkui --- drivers/gpu/drm/msm/disp/msm_disp_snapshot.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/msm_disp_snapshot.h b/drivers/gpu/drm/msm/disp/msm_disp_snapsh