[PATCH -next] drm/i915/gt: Make use of __assign_bit() API

2024-09-02 Thread Hongbo Li
We have for some time the __assign_bit() API to replace open coded if (foo) __set_bit(n, bar); else __clear_bit(n, bar); Use this API to simplify the code. No functional change intended. Signed-off-by: Hongbo Li --- drivers/gpu/drm/i915/gt/intel_ggtt_fencing.c | 5

[PATCH -next] drm/i915: Remove extra unlikely helper

2024-08-31 Thread Hongbo Li
In IS_ERR, the unlikely is used for the input parameter, so these is no need to use it again outside. Signed-off-by: Hongbo Li --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b

[PATCH -next] drm/amd/display: Use swap() to improve code

2024-08-30 Thread Hongbo Li
Use the swap() macro to simplify the code and improve its readability. The target code segment uses the bubble sort, we can use this macro to simplify the code. Signed-off-by: Hongbo Li --- drivers/gpu/drm/amd/display/dc/dml2/dml2_dc_resource_mgmt.c | 5 + 1 file changed, 1 insertion(+), 4