aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
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 /kernel
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 'kernel')
-rw-r--r--kernel/cpuset.c4
-rw-r--r--kernel/profile.c3
-rw-r--r--kernel/sched.c3
-rw-r--r--kernel/workqueue.c2
4 files changed, 1 insertions, 11 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index bd1e89c4c96a..9b62b4c03ad0 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -2044,7 +2044,6 @@ out:
2044 return err; 2044 return err;
2045} 2045}
2046 2046
2047#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_MEMORY_HOTPLUG)
2048/* 2047/*
2049 * If common_cpu_mem_hotplug_unplug(), below, unplugs any CPUs 2048 * If common_cpu_mem_hotplug_unplug(), below, unplugs any CPUs
2050 * or memory nodes, we need to walk over the cpuset hierarchy, 2049 * or memory nodes, we need to walk over the cpuset hierarchy,
@@ -2108,9 +2107,7 @@ static void common_cpu_mem_hotplug_unplug(void)
2108 mutex_unlock(&callback_mutex); 2107 mutex_unlock(&callback_mutex);
2109 mutex_unlock(&manage_mutex); 2108 mutex_unlock(&manage_mutex);
2110} 2109}
2111#endif
2112 2110
2113#ifdef CONFIG_HOTPLUG_CPU
2114/* 2111/*
2115 * The top_cpuset tracks what CPUs and Memory Nodes are online, 2112 * The top_cpuset tracks what CPUs and Memory Nodes are online,
2116 * period. This is necessary in order to make cpusets transparent 2113 * period. This is necessary in order to make cpusets transparent
@@ -2127,7 +2124,6 @@ static int cpuset_handle_cpuhp(struct notifier_block *nb,
2127 common_cpu_mem_hotplug_unplug(); 2124 common_cpu_mem_hotplug_unplug();
2128 return 0; 2125 return 0;
2129} 2126}
2130#endif
2131 2127
2132#ifdef CONFIG_MEMORY_HOTPLUG 2128#ifdef CONFIG_MEMORY_HOTPLUG
2133/* 2129/*
diff --git a/kernel/profile.c b/kernel/profile.c
index 04fd84e8cdbe..0961d93e1d91 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -319,7 +319,6 @@ out:
319 put_cpu(); 319 put_cpu();
320} 320}
321 321
322#ifdef CONFIG_HOTPLUG_CPU
323static int __devinit profile_cpu_callback(struct notifier_block *info, 322static int __devinit profile_cpu_callback(struct notifier_block *info,
324 unsigned long action, void *__cpu) 323 unsigned long action, void *__cpu)
325{ 324{
@@ -372,10 +371,10 @@ static int __devinit profile_cpu_callback(struct notifier_block *info,
372 } 371 }
373 return NOTIFY_OK; 372 return NOTIFY_OK;
374} 373}
375#endif /* CONFIG_HOTPLUG_CPU */
376#else /* !CONFIG_SMP */ 374#else /* !CONFIG_SMP */
377#define profile_flip_buffers() do { } while (0) 375#define profile_flip_buffers() do { } while (0)
378#define profile_discard_flip_buffers() do { } while (0) 376#define profile_discard_flip_buffers() do { } while (0)
377#define profile_cpu_callback NULL
379 378
380void profile_hits(int type, void *__pc, unsigned int nr_hits) 379void profile_hits(int type, void *__pc, unsigned int nr_hits)
381{ 380{
diff --git a/kernel/sched.c b/kernel/sched.c
index 75a005ed4eda..c83f531c2886 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6740,8 +6740,6 @@ SYSDEV_ATTR(sched_smt_power_savings, 0644, sched_smt_power_savings_show,
6740 sched_smt_power_savings_store); 6740 sched_smt_power_savings_store);
6741#endif 6741#endif
6742 6742
6743
6744#ifdef CONFIG_HOTPLUG_CPU
6745/* 6743/*
6746 * Force a reinitialization of the sched domains hierarchy. The domains 6744 * Force a reinitialization of the sched domains hierarchy. The domains
6747 * and groups cannot be updated in place without racing with the balancing 6745 * and groups cannot be updated in place without racing with the balancing
@@ -6774,7 +6772,6 @@ static int update_sched_domains(struct notifier_block *nfb,
6774 6772
6775 return NOTIFY_OK; 6773 return NOTIFY_OK;
6776} 6774}
6777#endif
6778 6775
6779void __init sched_init_smp(void) 6776void __init sched_init_smp(void)
6780{ 6777{
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 5484d6e045c2..c5257316f4b9 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -655,7 +655,6 @@ int current_is_keventd(void)
655 655
656} 656}
657 657
658#ifdef CONFIG_HOTPLUG_CPU
659/* Take the work from this (downed) CPU. */ 658/* Take the work from this (downed) CPU. */
660static void take_over_work(struct workqueue_struct *wq, unsigned int cpu) 659static void take_over_work(struct workqueue_struct *wq, unsigned int cpu)
661{ 660{
@@ -738,7 +737,6 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb,
738 737
739 return NOTIFY_OK; 738 return NOTIFY_OK;
740} 739}
741#endif
742 740
743void init_workqueues(void) 741void init_workqueues(void)
744{ 742{