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