Skip to content

Commit 1d67d67

Browse files
Fushuai Wangrostedt
authored andcommitted
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. Link: https://lore.kernel.org/20250811064158.2456-1-wangfushuai@baidu.com Signed-off-by: Fushuai Wang <wangfushuai@baidu.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent 09da593 commit 1d67d67

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/trace/trace_osnoise.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ static inline void tlat_var_reset(void)
271271
* So far, all the values are initialized as 0, so
272272
* zeroing the structure is perfect.
273273
*/
274-
for_each_cpu(cpu, cpu_online_mask) {
274+
for_each_online_cpu(cpu) {
275275
tlat_var = per_cpu_ptr(&per_cpu_timerlat_var, cpu);
276276
if (tlat_var->kthread)
277277
hrtimer_cancel(&tlat_var->timer);
@@ -295,7 +295,7 @@ static inline void osn_var_reset(void)
295295
* So far, all the values are initialized as 0, so
296296
* zeroing the structure is perfect.
297297
*/
298-
for_each_cpu(cpu, cpu_online_mask) {
298+
for_each_online_cpu(cpu) {
299299
osn_var = per_cpu_ptr(&per_cpu_osnoise_var, cpu);
300300
memset(osn_var, 0, sizeof(*osn_var));
301301
}

0 commit comments

Comments
 (0)