aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpu.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-12-06 23:38:17 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-07 11:39:39 -0500
commit02316067852187b8bec781bec07410e91af79627 (patch)
tree856e3f4610c91a6548bf3bf5c70ecbc0b28a4145 /include/linux/cpu.h
parenta38a44c1a93078fc5fadc4ac2df8dea4697069e2 (diff)
[PATCH] hotplug CPU: clean up hotcpu_notifier() use
There was lots of #ifdef noise in the kernel due to hotcpu_notifier(fn, prio) not correctly marking 'fn' as used in the !HOTPLUG_CPU case, and thus generating compiler warnings of unused symbols, hence forcing people to add #ifdefs. the compiler can skip truly unused functions just fine: text data bss dec hex filename 1624412 728710 3674856 6027978 5bfaca vmlinux.before 1624412 728710 3674856 6027978 5bfaca vmlinux.after [akpm@osdl.org: topology.c fix] Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/cpu.h')
-rw-r--r--include/linux/cpu.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index f02d71bf6894..71dc6ba4f73f 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -89,9 +89,9 @@ int cpu_down(unsigned int cpu);
89#define lock_cpu_hotplug() do { } while (0) 89#define lock_cpu_hotplug() do { } while (0)
90#define unlock_cpu_hotplug() do { } while (0) 90#define unlock_cpu_hotplug() do { } while (0)
91#define lock_cpu_hotplug_interruptible() 0 91#define lock_cpu_hotplug_interruptible() 0
92#define hotcpu_notifier(fn, pri) do { } while (0) 92#define hotcpu_notifier(fn, pri) do { (void)(fn); } while (0)
93#define register_hotcpu_notifier(nb) do { } while (0) 93#define register_hotcpu_notifier(nb) do { (void)(nb); } while (0)
94#define unregister_hotcpu_notifier(nb) do { } while (0) 94#define unregister_hotcpu_notifier(nb) do { (void)(nb); } while (0)
95 95
96/* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */ 96/* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */
97static inline int cpu_is_offline(int cpu) { return 0; } 97static inline int cpu_is_offline(int cpu) { return 0; }