mirror of
https://github.com/torvalds/linux.git
synced 2026-01-24 23:16:46 +00:00
tracing: Replace opencoded cpumask_next_wrap() in move_to_next_cpu()
The dedicated cpumask_next_wrap() is more verbose and effective than cpumask_next() followed by cpumask_first(). Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/20250605000651.45281-1-yury.norov@gmail.com Signed-off-by: Yury Norov <yury.norov@gmail.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
This commit is contained in:
committed by
Steven Rostedt (Google)
parent
d7b8f8e208
commit
88c79ecfb6
@@ -325,12 +325,9 @@ static void move_to_next_cpu(void)
|
||||
|
||||
cpus_read_lock();
|
||||
cpumask_and(current_mask, cpu_online_mask, tr->tracing_cpumask);
|
||||
next_cpu = cpumask_next(raw_smp_processor_id(), current_mask);
|
||||
next_cpu = cpumask_next_wrap(raw_smp_processor_id(), current_mask);
|
||||
cpus_read_unlock();
|
||||
|
||||
if (next_cpu >= nr_cpu_ids)
|
||||
next_cpu = cpumask_first(current_mask);
|
||||
|
||||
if (next_cpu >= nr_cpu_ids) /* Shouldn't happen! */
|
||||
goto change_mode;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user