summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-06-25 05:48:10 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 10:01:12 -0700
commit9de9adb615bddbdb786273c41ec3c03837e32fa5 (patch)
treed9c37e52c032f9bbb2da5f55868a79b299e58d25 /include
parenteab98702afa567927c9b052499b43acad2f25a1c (diff)
downloadop-kernel-dev-9de9adb615bddbdb786273c41ec3c03837e32fa5.zip
op-kernel-dev-9de9adb615bddbdb786273c41ec3c03837e32fa5.tar.gz
[PATCH] for_each_cpu_mask() warning fix
On UP, this: cpumask_t mask = node_to_cpumask(numa_node_id()); for_each_cpu_mask(cpu, mask) does this: mm/readahead.c: In function `node_readahead_aging': mm/readahead.c:850: warning: unused variable `mask' which is unpleasantly fixed by this: Acked-by: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/cpumask.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index fb5b761..b268a3c 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -317,7 +317,8 @@ static inline void __cpus_remap(cpumask_t *dstp, const cpumask_t *srcp,
(cpu) < NR_CPUS; \
(cpu) = next_cpu((cpu), (mask)))
#else /* NR_CPUS == 1 */
-#define for_each_cpu_mask(cpu, mask) for ((cpu) = 0; (cpu) < 1; (cpu)++)
+#define for_each_cpu_mask(cpu, mask) \
+ for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
#endif /* NR_CPUS */
/*
OpenPOWER on IntegriCloud