aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeiko Carstens <[email protected]>2010-03-05 13:42:41 -0800
committerLinus Torvalds <[email protected]>2010-03-06 11:26:29 -0800
commit221e3ebf6d5f2625373573155924e39f196c5d3d (patch)
tree7bd7bd1441469f1590e9aec3376c234fcd3d3462
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 <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Ananth N Mavinakayanahalli <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Rusty Russell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-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;
#define cpu_present(cpu) cpumask_test_cpu((cpu), cpu_present_mask)
#define cpu_active(cpu) cpumask_test_cpu((cpu), cpu_active_mask)
#else
-#define num_online_cpus() 1
-#define num_possible_cpus() 1
-#define num_present_cpus() 1
-#define num_active_cpus() 1
+#define num_online_cpus() 1U
+#define num_possible_cpus() 1U
+#define num_present_cpus() 1U
+#define num_active_cpus() 1U
#define cpu_online(cpu) ((cpu) == 0)
#define cpu_possible(cpu) ((cpu) == 0)
#define cpu_present(cpu) ((cpu) == 0)