The dedicated helper is more verbose and efficient comparing to
cpumask_next() followed by cpumask_first().
Signed-off-by: "Yury Norov [NVIDIA]" <yury.norov@gmail.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
{
unsigned int next_cpu;
- next_cpu = cpumask_next(cpu, &watchdog_cpus);
- if (next_cpu >= nr_cpu_ids)
- next_cpu = cpumask_first(&watchdog_cpus);
-
+ next_cpu = cpumask_next_wrap(cpu, &watchdog_cpus);
if (next_cpu == cpu)
return nr_cpu_ids;