Commit:     761bb431908e84d1793c5eb6c2ae2cc4926bed3e
Parent:     4603ac180a824197c2262747948d0179eb076e9c
Author:     Satyam Sharma <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 18 03:06:38 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Oct 18 14:37:28 2007 -0700

    Redefine {un}register_hotcpu_notifier() !HOTPLUG_CPU stubs
    The return of the present "do {} while" based stub definition of
    register_hotcpu_notifier() cannot be checked.  This makes the stub
    asymmetric w.r.t.  the real HOTPLUG_CPU=y implementation that is
    int-returning.  So let us redefine this to be consistent with the full
    version.  Also do the same for unregister_hotcpu_notifier().
    We cannot define these as static inline functions due to an existing GCC
    bug (#33172).  So define as macros that return appropriately instead (int
    '0' for the register_hotcpu_notifier case and void for
    Signed-off-by: Satyam Sharma <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 include/linux/cpu.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 0ad72c4..b79c575 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -119,8 +119,9 @@ static inline void cpuhotplug_mutex_unlock(struct mutex 
 #define lock_cpu_hotplug()     do { } while (0)
 #define unlock_cpu_hotplug()   do { } while (0)
 #define hotcpu_notifier(fn, pri)       do { (void)(fn); } while (0)
-#define register_hotcpu_notifier(nb)   do { (void)(nb); } while (0)
-#define unregister_hotcpu_notifier(nb) do { (void)(nb); } while (0)
+/* These aren't inline functions due to a GCC bug. */
+#define register_hotcpu_notifier(nb)   ({ (void)(nb); 0; })
+#define unregister_hotcpu_notifier(nb) ({ (void)(nb); })
 /* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */
 static inline int cpu_is_offline(int cpu) { return 0; }
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to