Commit f49a4af3 authored by Yury Norov [NVIDIA]'s avatar Yury Norov [NVIDIA] Committed by Yury Norov
Browse files

watchdog: fix opencoded cpumask_next_wrap() in watchdog_next_cpu()



The dedicated helper is more verbose and efficient comparing to
cpumask_next() followed by cpumask_first().

Signed-off-by: default avatar"Yury Norov [NVIDIA]" <yury.norov@gmail.com>
Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
parent 8557c862
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -12,10 +12,7 @@ static unsigned int watchdog_next_cpu(unsigned int cpu)
{
	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;