cpuhotplug: remove cpu_hotplug_init()
From: Lai Jiangshan <[email protected]>
cpu_hotplug_init() is almost equal to a dummy function, this patch remove it.
Signed-off-by Lai Jiangshan <[email protected]>
Signed-off-by Rusty Russell <[email protected]>
--- include/linux/cpu.h | 5 ----- init/main.c | 1 - kernel/cpu.c | 11 +++-------- 3 files changed, 3 insertions(+), 14 deletions(-)
include/linux/cpu.h +0 -5
@@ -69,7 +69,6 @@ static inline void unregister_cpu_notifiint cpu_up (unsigned int cpu);void notify_cpu_starting (unsigned int cpu); -extern void cpu_hotplug_init (void );extern void cpu_maps_update_begin (void );extern void cpu_maps_update_done (void );
@@ -81,10 +80,6 @@ static inline int register_cpu_notifier( }static inline void unregister_cpu_notifier (struct notifier_block *nb) -{ -} - -static inline void cpu_hotplug_init (void ) { }
init/main.c +0 -1
@@ -647,7 +647,6 @@ asmlinkage void __init start_kernel(voidpage_cgroup_init ();mem_init ();enable_debug_pagealloc (); -cpu_hotplug_init ();kmem_cache_init ();kmemtrace_init ();debug_objects_mem_init ();
kernel/cpu.c +3 -8
@@ -34,14 +34,9 @@ static struct {* an ongoing cpu hotplug operation. */ int refcount; -} cpu_hotplug; - -void __init cpu_hotplug_init (void ) -{ - cpu_hotplug.active_writer =NULL ; -mutex_init (&cpu_hotplug.lock); - cpu_hotplug.refcount =0 ; -} +} cpu_hotplug = { + .lock = __MUTEX_INITIALIZER(cpu_hotplug.lock), +};#ifdef CONFIG_HOTPLUG_CPU