Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915/display: hide global state iterators, remove unused

for_each_{new,old,oldnew}_global_obj_in_state() are only used within
intel_global_state.c, hide them there. intel_for_each_global_obj() is
unused, remove it.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/a23212d9298423d8971d6ad62f961386f7f927cc.1753953530.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Jani Nikula 6098dcfa cdaecac4

+25 -28
+25
drivers/gpu/drm/i915/display/intel_global_state.c
··· 13 13 #include "intel_display_types.h" 14 14 #include "intel_global_state.h" 15 15 16 + #define for_each_new_global_obj_in_state(__state, obj, new_obj_state, __i) \ 17 + for ((__i) = 0; \ 18 + (__i) < (__state)->num_global_objs && \ 19 + ((obj) = (__state)->global_objs[__i].ptr, \ 20 + (new_obj_state) = (__state)->global_objs[__i].new_state, 1); \ 21 + (__i)++) \ 22 + for_each_if(obj) 23 + 24 + #define for_each_old_global_obj_in_state(__state, obj, old_obj_state, __i) \ 25 + for ((__i) = 0; \ 26 + (__i) < (__state)->num_global_objs && \ 27 + ((obj) = (__state)->global_objs[__i].ptr, \ 28 + (old_obj_state) = (__state)->global_objs[__i].old_state, 1); \ 29 + (__i)++) \ 30 + for_each_if(obj) 31 + 32 + #define for_each_oldnew_global_obj_in_state(__state, obj, old_obj_state, new_obj_state, __i) \ 33 + for ((__i) = 0; \ 34 + (__i) < (__state)->num_global_objs && \ 35 + ((obj) = (__state)->global_objs[__i].ptr, \ 36 + (old_obj_state) = (__state)->global_objs[__i].old_state, \ 37 + (new_obj_state) = (__state)->global_objs[__i].new_state, 1); \ 38 + (__i)++) \ 39 + for_each_if(obj) 40 + 16 41 struct intel_global_commit { 17 42 struct kref ref; 18 43 struct completion done;
-28
drivers/gpu/drm/i915/display/intel_global_state.h
··· 26 26 const struct intel_global_state_funcs *funcs; 27 27 }; 28 28 29 - #define intel_for_each_global_obj(obj, dev_priv) \ 30 - list_for_each_entry(obj, &(dev_priv)->display.global.obj_list, head) 31 - 32 - #define for_each_new_global_obj_in_state(__state, obj, new_obj_state, __i) \ 33 - for ((__i) = 0; \ 34 - (__i) < (__state)->num_global_objs && \ 35 - ((obj) = (__state)->global_objs[__i].ptr, \ 36 - (new_obj_state) = (__state)->global_objs[__i].new_state, 1); \ 37 - (__i)++) \ 38 - for_each_if(obj) 39 - 40 - #define for_each_old_global_obj_in_state(__state, obj, old_obj_state, __i) \ 41 - for ((__i) = 0; \ 42 - (__i) < (__state)->num_global_objs && \ 43 - ((obj) = (__state)->global_objs[__i].ptr, \ 44 - (old_obj_state) = (__state)->global_objs[__i].old_state, 1); \ 45 - (__i)++) \ 46 - for_each_if(obj) 47 - 48 - #define for_each_oldnew_global_obj_in_state(__state, obj, old_obj_state, new_obj_state, __i) \ 49 - for ((__i) = 0; \ 50 - (__i) < (__state)->num_global_objs && \ 51 - ((obj) = (__state)->global_objs[__i].ptr, \ 52 - (old_obj_state) = (__state)->global_objs[__i].old_state, \ 53 - (new_obj_state) = (__state)->global_objs[__i].new_state, 1); \ 54 - (__i)++) \ 55 - for_each_if(obj) 56 - 57 29 struct intel_global_commit; 58 30 59 31 struct intel_global_state {