[PATCH] drm/exynos: use KMEM_CACHE() to create g2d_runqueue_node cache

2024-02-25 Thread Kunwu Chan
Use the KMEM_CACHE() macro instead of kmem_cache_create() to simplify the creation of SLAB caches when the default values are used. Signed-off-by: Kunwu Chan --- drivers/gpu/drm/exynos/exynos_drm_g2d.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos

[PATCH] drm/xe: use KMEM_CACHE() to create xe_hw_fence cache

2024-02-25 Thread Kunwu Chan
Use the KMEM_CACHE() macro instead of kmem_cache_create() to simplify the creation of SLAB caches when the default values are used. Signed-off-by: Kunwu Chan --- drivers/gpu/drm/xe/xe_hw_fence.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/xe

[PATCH 2/3] drm/amdgpu: Simplify the allocation of mux_chunk slab caches

2024-02-21 Thread Kunwu Chan
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Signed-off-by: Kunwu Chan --- drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 3/3] drm/amdgpu: Simplify the allocation of sync slab caches

2024-02-21 Thread Kunwu Chan
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Signed-off-by: Kunwu Chan --- drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b

[PATCH 1/3] drm/amdgpu: Simplify the allocation of fence slab caches

2024-02-21 Thread Kunwu Chan
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Signed-off-by: Kunwu Chan --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b

[PATCH 0/3] drm/amdgpu: Use KMEM_CACHE instead of kmem_cache_create

2024-02-21 Thread Kunwu Chan
For where the cache name and the structure name match. Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Kunwu Chan (3): drm/amdgpu: Simplify the allocation of fence slab caches drm/amdgpu: Simplify the allocation of mux_chunk slab

[PATCH] drm/lima: Simplify the allocation of slab caches in lima_sched_slab_init

2024-02-21 Thread Kunwu Chan
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Signed-off-by: Kunwu Chan --- drivers/gpu/drm/lima/lima_sched.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm

[PATCH] drm/scheduler: Simplify the allocation of slab caches in drm_sched_fence_slab_init

2024-02-21 Thread Kunwu Chan
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Signed-off-by: Kunwu Chan --- drivers/gpu/drm/scheduler/sched_fence.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/scheduler/sched_fence.c b

[PATCH] hwmon: (peci/cputemp) Add a null pointer check to the wled_configure

2024-01-18 Thread Kunwu Chan
devm_kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Signed-off-by: Kunwu Chan --- drivers/video/backlight/qcom-wled.c | 5 - 1 file changed, 4 insertions(+), 1 deletion

Re: [PATCH] drm/msm/adreno: Add a null pointer check in zap_shader_load_mdt()

2024-01-17 Thread Kunwu Chan
On 2024/1/18 02:50, Markus Elfring wrote: kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. … +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c @@ -144,6 +144,10 @@ static int

[PATCH] drm/msm/adreno: Add a null pointer check to the zap_shader_load_mdt

2024-01-15 Thread Kunwu Chan
kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Signed-off-by: Kunwu Chan --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 4 1 file changed, 4 insertions(+) diff --git

[PATCH] drm/i915/display: Fix null pointer dereference in intel_dp_aux_wait_done and intel_dp_aux_xfer

2023-11-23 Thread Kunwu Chan
kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. When "intel_dp->aux.name" is NULL, these error messages will trigger the null pointer dereference issue. Signed-off-by: Kunwu Chan --- drivers/gpu/drm/i915/display/intel_dp_aux.c | 12 ++

[PATCH] drm/msm/gpu: Fix null-pointer dereference in zap_shader_load_mdt

2023-11-22 Thread Kunwu Chan
kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Fixes: a9e2559c931d ("drm/msm/gpu: Move zap shader loading to adreno") Signed-off-by: Kunwu Chan --- drivers/gpu/drm/

[PATCH v2] drm/i915: Fix potential spectre vulnerability

2023-11-02 Thread Kunwu Chan
Fix smatch warning: drivers/gpu/drm/i915/gem/i915_gem_context.c:847 set_proto_ctx_sseu() warn: potential spectre issue 'pc->user_engines' [r] (local cap) Fixes: d4433c7600f7 ("drm/i915/gem: Use the proto-context to handle create parameters (v5)") Cc: # v5.15+ Signed-off-b

Re: [PATCH] drm/i915: Fix potential spectre vulnerability

2023-11-02 Thread Kunwu Chan
Hi Tvrtko, Thank you very much for your kind suggestion, I have modified it in accordance with your suggestion. On 2023/11/2 19:32, Tvrtko Ursulin wrote: On 02/11/2023 10:16, chentao wrote: Fix smatch warning: drivers/gpu/drm/i915/gem/i915_gem_context.c:847 set_proto_ctx_sseu() warn:

Re: [PATCH] drm/atomic: Spelling fix in comments

2023-10-26 Thread Kunwu Chan
t; "preceding"`, in general to determine an appropriate prefix, you can see what previous commits used when making changes to files in your particular patch, e.g. using the following: $ git log drivers/gpu/drm/drm_atomic_helper.c On 10/25/23 04:26, Kunwu Chan wrote: fix a typo in

[PATCH] drm/imx: Spelling fix in comment

2023-10-25 Thread Kunwu Chan
fix a misspelling of "concurrent". Signed-off-by: Kunwu Chan --- drivers/gpu/drm/imx/dcss/dcss-ctxld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/imx/dcss/dcss-ctxld.c b/drivers/gpu/drm/imx/dcss/dcss-ctxld.c index 3a84cb3209c4..28727a8cb

[PATCH] drm/atomic: Spelling fix in comments

2023-10-25 Thread Kunwu Chan
fix a typo in a comments. Signed-off-by: Kunwu Chan --- drivers/gpu/drm/drm_atomic_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 2444fc33dd7c..c3f677130def 100644 --- a/drivers