[PATCH] hotcpu_notifier-fixes
authorAndrew Morton <akpm@osdl.org>
Sat, 1 Jul 2006 11:36:30 +0000 (04:36 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 1 Jul 2006 16:56:03 +0000 (09:56 -0700)
Always use do {} while (0).  Failing to do so can cause subtle compile
failures or bugs.

Cc: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/cpu.h

index a3caf68..44a11f1 100644 (file)
@@ -87,9 +87,9 @@ int cpu_down(unsigned int cpu);
 #define lock_cpu_hotplug()     do { } while (0)
 #define unlock_cpu_hotplug()   do { } while (0)
 #define lock_cpu_hotplug_interruptible() 0
-#define hotcpu_notifier(fn, pri)
-#define register_hotcpu_notifier(nb)
-#define unregister_hotcpu_notifier(nb)
+#define hotcpu_notifier(fn, pri)       do { } while (0)
+#define register_hotcpu_notifier(nb)   do { } while (0)
+#define unregister_hotcpu_notifier(nb) do { } while (0)
 
 /* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */
 static inline int cpu_is_offline(int cpu) { return 0; }