Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02316067 authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds
Browse files

[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: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a38a44c1
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -116,7 +116,6 @@ static __cpuinit int thermal_throttle_add_dev(struct sys_device *sys_dev)
	return sysfs_create_group(&sys_dev->kobj, &thermal_throttle_attr_group);
}

#ifdef CONFIG_HOTPLUG_CPU
static __cpuinit void thermal_throttle_remove_dev(struct sys_device *sys_dev)
{
	return sysfs_remove_group(&sys_dev->kobj, &thermal_throttle_attr_group);
@@ -153,7 +152,6 @@ static struct notifier_block thermal_throttle_cpu_notifier =
{
	.notifier_call = thermal_throttle_cpu_callback,
};
#endif /* CONFIG_HOTPLUG_CPU */

static __init int thermal_throttle_init_device(void)
{
+0 −2
Original line number Diff line number Diff line
@@ -167,7 +167,6 @@ static int cpuid_device_create(int i)
	return err;
}

#ifdef CONFIG_HOTPLUG_CPU
static int cpuid_class_cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
{
	unsigned int cpu = (unsigned long)hcpu;
@@ -187,7 +186,6 @@ static struct notifier_block __cpuinitdata cpuid_class_cpu_notifier =
{
	.notifier_call = cpuid_class_cpu_callback,
};
#endif /* !CONFIG_HOTPLUG_CPU */

static int __init cpuid_init(void)
{
+0 −2
Original line number Diff line number Diff line
@@ -703,7 +703,6 @@ static struct sysdev_driver mc_sysdev_driver = {
	.resume = mc_sysdev_resume,
};

#ifdef CONFIG_HOTPLUG_CPU
static __cpuinit int
mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
{
@@ -726,7 +725,6 @@ mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
static struct notifier_block mc_cpu_notifier = {
	.notifier_call = mc_cpu_callback,
};
#endif

static int __init microcode_init (void)
{
+0 −2
Original line number Diff line number Diff line
@@ -250,7 +250,6 @@ static int msr_device_create(int i)
	return err;
}

#ifdef CONFIG_HOTPLUG_CPU
static int msr_class_cpu_callback(struct notifier_block *nfb,
				unsigned long action, void *hcpu)
{
@@ -271,7 +270,6 @@ static struct notifier_block __cpuinitdata msr_class_cpu_notifier =
{
	.notifier_call = msr_class_cpu_callback,
};
#endif

static int __init msr_init(void)
{
+0 −2
Original line number Diff line number Diff line
@@ -952,7 +952,6 @@ remove_palinfo_proc_entries(unsigned int hcpu)
	}
}

#ifdef CONFIG_HOTPLUG_CPU
static int palinfo_cpu_callback(struct notifier_block *nfb,
					unsigned long action, void *hcpu)
{
@@ -974,7 +973,6 @@ static struct notifier_block palinfo_cpu_notifier =
	.notifier_call = palinfo_cpu_callback,
	.priority = 0,
};
#endif

static int __init
palinfo_init(void)
Loading