sched: proper prototype for kernel/sched.c:migration_init()

This patch adds a proper prototype for migration_init() in
include/linux/sched.h

Since there's no point in always returning 0 to a caller that doesn't check
the return value it also changes the function to return void.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by Adrian Bunk and committed by Ingo Molnar e6fe6649 b82d9fdd

+10 -6
+8
include/linux/sched.h
··· 1988 } 1989 #endif 1990 1991 #endif /* __KERNEL__ */ 1992 1993 #endif
··· 1988 } 1989 #endif 1990 1991 + #ifdef CONFIG_SMP 1992 + void migration_init(void); 1993 + #else 1994 + static inline void migration_init(void) 1995 + { 1996 + } 1997 + #endif 1998 + 1999 #endif /* __KERNEL__ */ 2000 2001 #endif
+1 -3
init/main.c
··· 56 #include <linux/pid_namespace.h> 57 #include <linux/device.h> 58 #include <linux/kthread.h> 59 60 #include <asm/io.h> 61 #include <asm/bugs.h> ··· 748 static void __init do_pre_smp_initcalls(void) 749 { 750 extern int spawn_ksoftirqd(void); 751 - #ifdef CONFIG_SMP 752 - extern int migration_init(void); 753 754 migration_init(); 755 - #endif 756 spawn_ksoftirqd(); 757 if (!nosoftlockup) 758 spawn_softlockup_task();
··· 56 #include <linux/pid_namespace.h> 57 #include <linux/device.h> 58 #include <linux/kthread.h> 59 + #include <linux/sched.h> 60 61 #include <asm/io.h> 62 #include <asm/bugs.h> ··· 747 static void __init do_pre_smp_initcalls(void) 748 { 749 extern int spawn_ksoftirqd(void); 750 751 migration_init(); 752 spawn_ksoftirqd(); 753 if (!nosoftlockup) 754 spawn_softlockup_task();
+1 -3
kernel/sched.c
··· 5650 .priority = 10 5651 }; 5652 5653 - int __init migration_init(void) 5654 { 5655 void *cpu = (void *)(long)smp_processor_id(); 5656 int err; ··· 5660 BUG_ON(err == NOTIFY_BAD); 5661 migration_call(&migration_notifier, CPU_ONLINE, cpu); 5662 register_cpu_notifier(&migration_notifier); 5663 - 5664 - return 0; 5665 } 5666 #endif 5667
··· 5650 .priority = 10 5651 }; 5652 5653 + void __init migration_init(void) 5654 { 5655 void *cpu = (void *)(long)smp_processor_id(); 5656 int err; ··· 5660 BUG_ON(err == NOTIFY_BAD); 5661 migration_call(&migration_notifier, CPU_ONLINE, cpu); 5662 register_cpu_notifier(&migration_notifier); 5663 } 5664 #endif 5665