All of lore.kernel.org
 help / color / mirror / Atom feed
* + cpumask-let-num__cpus-function-always-return-unsigned-values.patch added to -mm tree
@ 2010-01-09  0:18 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2010-01-09  0:18 UTC (permalink / raw)
  To: mm-commits; +Cc: heiko.carstens, ananth, mhiramat, mingo, rusty


The patch titled
     cpumask: let num_*_cpus() function always return unsigned values
has been added to the -mm tree.  Its filename is
     cpumask-let-num__cpus-function-always-return-unsigned-values.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: cpumask: let num_*_cpus() function always return unsigned values
From: Heiko Carstens <heiko.carstens@de.ibm.com>

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>
---

 include/linux/cpumask.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff -puN include/linux/cpumask.h~cpumask-let-num__cpus-function-always-return-unsigned-values include/linux/cpumask.h
--- a/include/linux/cpumask.h~cpumask-let-num__cpus-function-always-return-unsigned-values
+++ a/include/linux/cpumask.h
@@ -90,10 +90,10 @@ extern const struct cpumask *const cpu_a
 #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)
_

Patches currently in -mm which might be from heiko.carstens@de.ibm.com are

linux-next.patch
cpumask-let-num__cpus-function-always-return-unsigned-values.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-01-09  0:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-09  0:18 + cpumask-let-num__cpus-function-always-return-unsigned-values.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.