Skip to content

Commit d207af2

Browse files
kelleymhIngo Molnar
authored andcommitted
cpumask: Make for_each_cpu_wrap() available on UP as well
for_each_cpu_wrap() was originally added in the #else half of a large "#if NR_CPUS == 1" statement, but was omitted in the #if half. This patch adds the missing #if half to prevent compile errors when NR_CPUS is 1. Reported-by: kbuild test robot <[email protected]> Signed-off-by: Michael Kelley <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Fixes: c743f0a ("sched/fair, cpumask: Export for_each_cpu_wrap()") Link: http://lkml.kernel.org/r/SN6PR1901MB2045F087F59450507D4FCC17CBF50@SN6PR1901MB2045.namprd19.prod.outlook.com Signed-off-by: Ingo Molnar <[email protected]>
1 parent e525de3 commit d207af2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/linux/cpumask.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ static inline unsigned int cpumask_local_spread(unsigned int i, int node)
170170
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
171171
#define for_each_cpu_not(cpu, mask) \
172172
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
173+
#define for_each_cpu_wrap(cpu, mask, start) \
174+
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask, (void)(start))
173175
#define for_each_cpu_and(cpu, mask, and) \
174176
for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask, (void)and)
175177
#else

0 commit comments

Comments
 (0)