projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8557c86
)
watchdog: fix opencoded cpumask_next_wrap() in watchdog_next_cpu()
author
Yury Norov [NVIDIA]
<yury.norov@gmail.com>
Thu, 5 Jun 2025 00:12:52 +0000
(20:12 -0400)
committer
Yury Norov
<yury.norov@gmail.com>
Thu, 31 Jul 2025 15:28:03 +0000
(11:28 -0400)
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>
kernel/watchdog_buddy.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/watchdog_buddy.c
b/kernel/watchdog_buddy.c
index 34dbfe091f4b1323ff362bb4b470c57e5db3b64e..ee754d767c2131e3cd34bccf26d8e6cf0e0b5f75 100644
(file)
--- a/
kernel/watchdog_buddy.c
+++ b/
kernel/watchdog_buddy.c
@@
-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;