tracing/osnoise: Use for_each_online_cpu() instead of for_each_cpu()
Subsystems (2)
PATCH 1/1 tracing/osnoise: Use for_each_online_cpu() instead of for_each_cpu()
Replace the opencoded for_each_cpu(cpu, cpu_online_mask) loop with the more readable and equivalent for_each_online_cpu(cpu) macro.
Signed-off-by Fushuai Wang <[email protected]>
--- kernel/trace/trace_osnoise.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/trace/trace_osnoise.c +2 -2
@@ -271,7 +271,7 @@ static inline void tlat_var_reset(void)* So far, all the values are initialized as 0, so * zeroing the structure is perfect. */ -for_each_cpu (cpu, cpu_online_mask) { +for_each_online_cpu (cpu) { tlat_var =per_cpu_ptr (&per_cpu_timerlat_var, cpu);if (tlat_var->kthread)hrtimer_cancel (&tlat_var->timer);
@@ -295,7 +295,7 @@ static inline void osn_var_reset(void)* So far, all the values are initialized as 0, so * zeroing the structure is perfect. */ -for_each_cpu (cpu, cpu_online_mask) { +for_each_online_cpu (cpu) { osn_var =per_cpu_ptr (&per_cpu_osnoise_var, cpu);memset (osn_var,0 ,sizeof (*osn_var)); }
Signature · 1 line
2.36.1