[PATCH linux-next v2] drm/nouveau/disp: switch to use kmemdup() helper

2024-01-08 Thread yang.guang5
From: Chen Haonan Use kmemdup() helper instead of open-coding to simplify the code. Signed-off-by: Chen Haonan Reviewed-by: Yang Guang --- drivers/gpu/drm/nouveau/nvif/outp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvif/outp.c b/drivers/g

[PATCH linux-next] drm/panel: Simplify with dev_err_probe()

2023-12-19 Thread yang.guang5
From: Yang Guang dev_err_probe() can check if the error code is -EPROBE_DEFER and can return the error code, replacing dev_err() with it simplifies the code. Signed-off-by: Chen Haonan --- drivers/gpu/drm/panel/panel-boe-himax8279d.c | 18 ++ 1 file changed, 6 insertions(+),

[PATCH linux-next] drm/amd/display: use kcalloc instead of open coded arithmetic

2023-12-19 Thread yang.guang5
From: Yang Guang Dynamic size calculations (especially multiplication) should not be performed in memory allocator (or similar) function arguments due to the risk of them overflowing. This could lead to values wrapping around and a smaller allocation being made than the caller was expecting.

[PATCH linux-next] drm/nouveau/disp: switch to use kmemdup() helper

2023-12-14 Thread yang.guang5
From: Yang Guang Use kmemdup() helper instead of open-coding to simplify the code. Signed-off-by: Chen Haonan --- drivers/gpu/drm/nouveau/nvif/outp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvif/outp.c b/drivers/gpu/drm/nouveau/nvif/outp.c

[PATCH linux-next] drm/amd/display: replace kzalloc and memcpy with kmemdup

2023-12-08 Thread yang.guang5
From: Yang Guang Convert kzalloc/memcpy operations to memdup makes for cleaner code and avoids memcpy() failures Signed-off-by: Chen Haonan --- drivers/gpu/drm/amd/display/dc/core/dc.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/d