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
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
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