aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpumask.h
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2010-03-05 16:42:41 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-06 14:26:29 -0500
commit221e3ebf6d5f2625373573155924e39f196c5d3d (patch)
tree7bd7bd1441469f1590e9aec3376c234fcd3d3462 /include/linux/cpumask.h
parent8aaed5bec2b9177eab1796c8c4f7a4c90804eef6 (diff)
cpumask: let num_*_cpus() function always return unsigned values
Dependent on CONFIG_SMP the num_*_cpus() functions return unsigned or signed values. Let them always return unsigned values to avoid strange casts. Fixes at least one warning: kernel/kprobes.c: In function 'register_kretprobe': kernel/kprobes.c:1038: warning: comparison of distinct pointer types lacks a cast Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Masami Hiramatsu <mhiramat@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/cpumask.h')
-rw-r--r--include/linux/cpumask.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index dbcee7647d9a..bae6fe24d1f9 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -90,10 +90,10 @@ extern const struct cpumask *const cpu_active_mask;
90#define cpu_present(cpu) cpumask_test_cpu((cpu), cpu_present_mask) 90#define cpu_present(cpu) cpumask_test_cpu((cpu), cpu_present_mask)
91#define cpu_active(cpu) cpumask_test_cpu((cpu), cpu_active_mask) 91#define cpu_active(cpu) cpumask_test_cpu((cpu), cpu_active_mask)
92#else 92#else
93#define num_online_cpus() 1 93#define num_online_cpus() 1U
94#define num_possible_cpus() 1 94#define num_possible_cpus() 1U
95#define num_present_cpus() 1 95#define num_present_cpus() 1U
96#define num_active_cpus() 1 96#define num_active_cpus() 1U
97#define cpu_online(cpu) ((cpu) == 0) 97#define cpu_online(cpu) ((cpu) == 0)
98#define cpu_possible(cpu) ((cpu) == 0) 98#define cpu_possible(cpu) ((cpu) == 0)
99#define cpu_present(cpu) ((cpu) == 0) 99#define cpu_present(cpu) ((cpu) == 0)