[PATCH] video: sh7760fb: Fix a possible memory leak in sh7760fb_alloc_mem()

2024-10-25 Thread Zhen Lei
When information such as info->screen_base is not ready, calling sh7760fb_free_mem() does not release memory correctly. Call dma_free_coherent() instead. Fixes: 4a25e41831ee ("video: sh7760fb: SH7760/SH7763 LCDC framebuffer driver") Signed-off-by: Zhen Lei --- drivers/video/fbdev/s

[PATCH] drm/i915: Fix error return code in igt_vma_create()

2021-07-15 Thread Zhen Lei
#x27;err' before 'goto out'. Fixes: e3c7a1c5377e ("drm/i915: Test creation of VMA") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/i915/selftests/i915_vma.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/selft

[PATCH 1/1] fbmem: Do not delete the mode that is still in use

2021-07-12 Thread Zhen Lei
Fixes: 13ff178ccd6d ("fbcon: Call fbcon_mode_deleted/new_modelist directly") Signed-off-by: Zhen Lei --- drivers/video/fbdev/core/fbmem.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbm

[PATCH 1/1] video: fbdev: sm501fb: use DEVICE_ATTR_RO macro

2021-06-01 Thread Zhen Lei
Use DEVICE_ATTR_RO macro helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei --- drivers/video/fbdev/sm501fb.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/sm501fb.c b/drivers

[PATCH 1/1] video: fbdev: w100fb: use DEVICE_ATTR_WO macro

2021-06-01 Thread Zhen Lei
Use DEVICE_ATTR_WO macro helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei --- drivers/video/fbdev/w100fb.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/w100fb.c b/drivers/video

[PATCH 1/1] video: fbdev: mb862xx: use DEVICE_ATTR_RO macro

2021-06-01 Thread Zhen Lei
Use DEVICE_ATTR_RO helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: Zhen Lei --- drivers/video/fbdev/mb862xx/mb862xxfbdrv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/mb862xx

[PATCH 1/1] drm/i915/selftests: Fix error return code in live_parallel_switch()

2021-05-27 Thread Zhen Lei
The error code returned from intel_context_create() should be propagated instead of 0, as done elsewhere in this function. Fixes: 50d16d44cce4 ("drm/i915/selftests: Exercise context switching in parallel") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/i915/gem

[PATCH 1/1] drm/i915/hdcp: Simplify code in intel_hdcp_auth_downstream()

2021-05-27 Thread Zhen Lei
And it's a little clearer to read. No functional change. Signed-off-by: Zhen Lei --- drivers/gpu/drm/i915/display/intel_hdcp.c | 24 ++- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/displ

[PATCH 1/1] drm/kmb: Fix error return code in kmb_hw_init()

2021-05-13 Thread Zhen Lei
KeemBay Display") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/kmb/kmb_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/kmb/kmb_drv.c b/drivers/gpu/drm/kmb/kmb_drv.c index f64e06e1067dd8d..96ea1a2c11dd6a3 100644 --- a/drivers/gpu/drm/kmb/kmb_drv.c +++ b

[PATCH v2 1/1] drm/mediatek: Remove redundant error printing

2021-05-11 Thread Zhen Lei
the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/mediatek/mtk_cec.c| 7 ++- drivers/gpu/drm/mediatek/mtk_disp_ccorr.c | 4 +--- drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 4 +--- drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 4 +--- drivers/gpu/drm

[PATCH v2 0/1] drm/mediatek: Remove redundant error printing

2021-05-11 Thread Zhen Lei
v1 --> v2: 1. Combine the modifications of several drm/mediatek files into one patch. 2. According to Baruch Siach's review comment, simplify the following code snippets: -ret = PTR_ERR(cec->regs); -return ret; +return PTR_ERR(cec->regs)

[PATCH 1/1] drm/pl111: Remove redundant error printing in pl111_amba_probe()

2021-05-11 Thread Zhen Lei
the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/pl111/pl111_drv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c index fa0a737e9dea868..653f426ff166592 100644 --- a/drivers/gpu/drm/pl111

[PATCH 1/1] drm/mediatek: mtk_dpi: Remove redundant error printing in mtk_dpi_probe()

2021-05-11 Thread Zhen Lei
the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/mediatek/mtk_dpi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index bea91c81626e154..891a109ffe441d8 100644 --- a/drivers/gpu/drm

[PATCH 1/1] drm/mediatek: Remove redundant error printing in mtk_cec_probe()

2021-05-11 Thread Zhen Lei
the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/mediatek/mtk_cec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_cec.c b/drivers/gpu/drm/mediatek/mtk_cec.c index e9cef5c0c8f7eff..fd593ff99bfd447 100644 --- a/drivers/gpu/drm

[PATCH 1/1] drm/exynos/decon5433: Remove redundant error printing in exynos5433_decon_probe()

2021-05-11 Thread Zhen Lei
the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c index

[PATCH 1/1] drm/stm: dsi: Remove redundant error printing in dw_mipi_dsi_stm_probe()

2021-05-11 Thread Zhen Lei
the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c index 8399d337589d5e4..2c6da2625cdfdcb 100644 --- a/drivers

[PATCH 1/1] drm/mediatek: Remove redundant error printing in mtk_dsi_probe()

2021-05-11 Thread Zhen Lei
the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/mediatek/mtk_dsi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index ae403c67cbd922d..89e351dfab88177 100644 --- a/drivers/gpu/drm

[PATCH 1/1] drm/kmb: Remove redundant error printing in kmb_dsi_map_mmio()

2021-05-11 Thread Zhen Lei
the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/kmb/kmb_dsi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/kmb/kmb_dsi.c b/drivers/gpu/drm/kmb/kmb_dsi.c index 4b5d82af84b3014..6f278bc018cee67 100644 --- a/drivers/gpu

[PATCH 1/1] drm/exynos: Remove redundant error printing in exynos_dsi_probe()

2021-05-11 Thread Zhen Lei
the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index 44e402b7cdfb6e3

[PATCH 1/1] drm/vc4: Remove redundant error printing in vc4_ioremap_regs()

2021-05-11 Thread Zhen Lei
the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/vc4/vc4_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index 556ad0f02a0db56..46091f3b4857c93 100644 --- a/drivers/gpu

[PATCH 1/1] drm/mcde: Remove redundant error printing in mcde_dsi_probe()

2021-05-11 Thread Zhen Lei
the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/mcde/mcde_dsi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c index b3fd3501c412799..5aade1d13961ab7 100644 --- a/drivers

[PATCH 1/1] drm/panfrost: Remove redundant error printing in panfrost_device_init()

2021-05-11 Thread Zhen Lei
the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/panfrost/panfrost_device.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c index fbcf5edbe367521..125ed973feaad0a 100644

[PATCH v2 2/2] drm/nouveau: Fix error return code in nouveau_backlight_init()

2021-05-11 Thread Zhen Lei
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: db1a0ae21461 ("drm/nouveau/bl: Assign different names to interfaces") Suggested-by: Pierre Moreau Signed-off-by: Zhen Lei --- drivers/gpu/drm/nouveau/nouveau_b

[PATCH v2 0/2] Fix ida leak and error return code

2021-05-11 Thread Zhen Lei
v1 --> v2: 1. Add Patch 1 to fix ida leak 2. Modifies nouveau_get_backlight_name() to propagate the actual error code Zhen Lei (2): drm/nouveau: Fix ida leak drm/nouveau: Fix error return code in nouveau_backlight_init() drivers/gpu/drm/nouveau/nouveau_backlight.c | 14 --

[PATCH v2 1/2] drm/nouveau: Fix ida leak

2021-05-11 Thread Zhen Lei
db1a0ae21461 ("drm/nouveau/bl: Assign different names to interfaces") Signed-off-by: Zhen Lei --- drivers/gpu/drm/nouveau/nouveau_backlight.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_backlight.c b/drivers/gpu/drm/nouveau/n

[PATCH 1/1] drm/amdgpu: Delete two unneeded bool conversions

2021-05-10 Thread Zhen Lei
The result of an expression consisting of a single relational operator is already of the bool type and does not need to be evaluated explicitly. No functional change. Signed-off-by: Zhen Lei --- drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH 1/1] drm/amd/display: Delete several unneeded bool conversions

2021-05-10 Thread Zhen Lei
The result of an expression consisting of a single relational operator is already of the bool type and does not need to be evaluated explicitly. No functional change. Signed-off-by: Zhen Lei --- drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp_cm.c | 4 ++-- drivers/gpu/drm/amd/display/dc/dcn30

[PATCH v2 0/1] drm/msm/dpu: Fix error return code in dpu_mdss_init()

2021-05-09 Thread Zhen Lei
v1 --> v2: According to Stephen Boyd's review comments, detele the unnecessary local variable initialization "ret = 0". Zhen Lei (1): drm/msm/dpu: Fix error return code in dpu_mdss_init() drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 8 +--- 1 file changed, 5 insertio

[PATCH v2 1/1] drm/msm/dpu: Fix error return code in dpu_mdss_init()

2021-05-09 Thread Zhen Lei
x27; to 0 is no longer needed, remove it. In addition, when dpu_mdss_init() is successfully returned, the value of 'ret' is always 0. Therefore, replace "return ret" with "return 0" to make the code clearer. Fixes: 070e64dc1bbc ("drm/msm/dpu: Convert to a chain

[PATCH v2 0/1] drm/msm/dpu: Fix error return code in dpu_mdss_init()

2021-05-09 Thread Zhen Lei
v1 --> v2: According to Anton Ivanov's review comments, detele the unnecessary local variable initialization "ret = 0". Zhen Lei (1): drm/msm/dpu: Fix error return code in dpu_mdss_init() drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 8 +--- 1 file changed, 5 insertio

[PATCH v2 1/1] drm/msm/dpu: Fix error return code in dpu_mdss_init()

2021-05-09 Thread Zhen Lei
x27; to 0 is no longer needed, remove it. In addition, when dpu_mdss_init() is successfully returned, the value of 'ret' is always 0. Therefore, replace "return ret" with "return 0" to make the code clearer. Fixes: 070e64dc1bbc ("drm/msm/dpu: Convert to a chain

[PATCH 1/1] drm/kmb: Remove several unneeded semicolons

2021-05-08 Thread Zhen Lei
The semicolon immediately following '}' is unneeded. Signed-off-by: Zhen Lei --- drivers/gpu/drm/kmb/kmb_dsi.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/kmb/kmb_dsi.c b/drivers/gpu/drm/kmb/kmb_dsi.c index 4b5d82af84b3014..23104

[PATCH 1/1] drm/mga: Fix error return code in mga_do_pci_dma_bootstrap()

2021-05-07 Thread Zhen Lei
The user may incorrectly set the value of dma_bs->secondary_bin_count to 0. In this case, the for loop is not entered and the 'err' value remains 0. Fixes: 6795c985a648 ("Add support for PCI MGA cards to MGA DRM.") Reported-by: Hulk Robot Signed-off-by: Zhen Lei -

[PATCH 1/1] drm/nouveau: fix error return code in nouveau_backlight_init()

2021-05-07 Thread Zhen Lei
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: db1a0ae21461 ("drm/nouveau/bl: Assign different names to interfaces") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/nouveau/nouveau_backl

[PATCH 1/1] drm/msm/dpu: Fix error return code in dpu_mdss_init()

2021-05-07 Thread Zhen Lei
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 070e64dc1bbc ("drm/msm/dpu: Convert to a chained irq chip") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 4 ++

[PATCH 1/1] drm/msm: Fix error return code in msm_drm_init()

2021-05-07 Thread Zhen Lei
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 7f9743abaa79 ("drm/msm: validate display and event threads") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/msm/msm_drv.c | 1 + 1 file

[PATCH 1/1] drm/nouveau/kms: remove unused local variable 'width'

2021-04-07 Thread Zhen Lei
Check framebuffer size against bo") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/nouveau/nouveau_display.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_displ

[PATCH 1/1] drm/msm/dpu: remove unused local variable 'cmd_enc'

2021-04-07 Thread Zhen Lei
] Fixes: fe286893ed34 ("drm/msm/dpu: Remove unused call in wait_for_commit_done") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phy

[PATCH 1/1] drm/msm/dp: remove unused local variable 'hpd'

2021-04-07 Thread Zhen Lei
nnect/disconnect handled at irq_hpd") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/msm/dp/dp_display.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index 5a39da6e1eaf277..31bf2a40a9eb2c9 10

[PATCH v2 1/1] drm/nouveau/dmem: Remove duplicated header file inclusion

2021-04-06 Thread Zhen Lei
Delete one of the header files that are included twice, all included header files are then rearranged alphabetically. Signed-off-by: Zhen Lei --- drivers/gpu/drm/nouveau/nouveau_dmem.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/drivers/gpu

[PATCH v2 0/1] drm/nouveau/dmem: Remove duplicated header file

2021-04-06 Thread Zhen Lei
v1 --> v2: Arrange all included header files in alphabetical order. Zhen Lei (1): drm/nouveau/dmem: Remove duplicated header file inclusion drivers/gpu/drm/nouveau/nouveau_dmem.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) -- 1.

[PATCH 1/1] drm/nouveau/nvenc: Remove duplicated header file inclusion

2021-03-27 Thread Zhen Lei
The header file "priv.h" is already included above and can be removed here. Signed-off-by: Zhen Lei --- drivers/gpu/drm/nouveau/nvkm/engine/nvenc/base.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/nvenc/base.c b/drivers/gpu/drm/nouveau/n

[PATCH 1/1] drm/nouveau/dmem: Remove duplicated header file inclusion

2021-03-27 Thread Zhen Lei
The header file is already included above and can be removed here. Signed-off-by: Zhen Lei --- drivers/gpu/drm/nouveau/nouveau_dmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_dmem.c b/drivers/gpu/drm/nouveau/nouveau_dmem.c index 92987daa5e17d02

[PATCH 1/1] drm/amd/display: Remove duplicated header file inclusion

2021-03-27 Thread Zhen Lei
The header file "dce110/dce110_resource.h" is already included above and can be removed here. Signed-off-by: Zhen Lei --- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c b/d

[PATCH 1/1] drm/amd/display: Remove duplicated header file inclusion

2021-03-27 Thread Zhen Lei
The header file is included in the following common section and can be removed here. Signed-off-by: Zhen Lei --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display

[PATCH v2 1/1] dt-bindings: display: eliminate yamllint warnings

2020-12-07 Thread Zhen Lei
/panel/novatek,nt36672a.yaml :25:10: [warning] wrong indentation: expected 10 but found 9 (indentation) Signed-off-by: Zhen Lei Acked-by: Sam Ravnborg --- .../devicetree/bindings/display/bridge/analogix,anx7625.yaml | 4 ++-- .../devicetree/bindings/display/bridge/intel,keembay-dsi.yaml

[PATCH v2 0/1] dt-bindings: display: eliminate yamllint warnings

2020-12-07 Thread Zhen Lei
ntation/devicetree/bindings/mmc/mtk-sd.yaml:33:9: [warning] wrong indentation: expected 10 but found 8 (indentation) ./Documentation/devicetree/bindings/sound/mt8192-mt6359-rt1015-rt5682.yaml:10:4: [warning] wrong indentation: expected 2 but found 3 (indentation) Zhen Lei (1): dt-bindings:

[PATCH 0/1] dt-bindings: eliminate yamllint warnings

2020-12-04 Thread Zhen Lei
d 2 but found 3 (indentation) Zhen Lei (1): dt-bindings: eliminate yamllint warnings .../devicetree/bindings/clock/imx8qxp-lpcg.yaml| 20 - .../bindings/display/bridge/analogix,anx7625.yaml | 4 ++-- .../bindings/display/bridge/intel,keembay-dsi.yaml | 4 ++-- .../binding

[PATCH 1/1] dt-bindings: eliminate yamllint warnings

2020-12-04 Thread Zhen Lei
All warnings are related only to "wrong indentation", except one: Documentation/devicetree/bindings/media/i2c/mipi-ccs.yaml:4:1: \ [error] missing document start "---" (document-start) Signed-off-by: Zhen Lei Cc: Rob Herring Cc: Michael Turquette Cc: Stephen Boyd Cc: S

[PATCH 1/1] drm/vmwgfx: remove an unnecessary check

2017-04-11 Thread Zhen Lei
ss than or equal to (DRM_VMW_MAX_SURFACE_FACES * DRM_VMW_MAX_MIP_LEVELS). Signed-off-by: Zhen Lei --- drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c index 05fa