]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
sched: proper prototype for kernel/sched.c:migration_init()
authorAdrian Bunk <bunk@kernel.org>
Fri, 9 Nov 2007 21:39:39 +0000 (22:39 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 9 Nov 2007 21:39:39 +0000 (22:39 +0100)
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>
include/linux/sched.h
init/main.c
kernel/sched.c

index 2cc789fef711d38efa77f12c96b082411c315dbd..ee800e7a70de427ae9ce46e34c27ac659d04336b 100644 (file)
@@ -1988,6 +1988,14 @@ static inline void inc_syscw(struct task_struct *tsk)
 }
 #endif
 
+#ifdef CONFIG_SMP
+void migration_init(void);
+#else
+static inline void migration_init(void)
+{
+}
+#endif
+
 #endif /* __KERNEL__ */
 
 #endif
index f605a969ea6141281891bb007edc41938c63e3f1..80b04b6c5157c85151669fdfe2864c16f876680e 100644 (file)
@@ -56,6 +56,7 @@
 #include <linux/pid_namespace.h>
 #include <linux/device.h>
 #include <linux/kthread.h>
+#include <linux/sched.h>
 
 #include <asm/io.h>
 #include <asm/bugs.h>
@@ -747,11 +748,8 @@ __setup("nosoftlockup", nosoftlockup_setup);
 static void __init do_pre_smp_initcalls(void)
 {
        extern int spawn_ksoftirqd(void);
-#ifdef CONFIG_SMP
-       extern int migration_init(void);
 
        migration_init();
-#endif
        spawn_ksoftirqd();
        if (!nosoftlockup)
                spawn_softlockup_task();
index e195a422941802b8660a2d59922b08026a030b12..b18f231a4875ad1cdf092c2774237a7bcc98d30e 100644 (file)
@@ -5650,7 +5650,7 @@ static struct notifier_block __cpuinitdata migration_notifier = {
        .priority = 10
 };
 
-int __init migration_init(void)
+void __init migration_init(void)
 {
        void *cpu = (void *)(long)smp_processor_id();
        int err;
@@ -5660,8 +5660,6 @@ int __init migration_init(void)
        BUG_ON(err == NOTIFY_BAD);
        migration_call(&migration_notifier, CPU_ONLINE, cpu);
        register_cpu_notifier(&migration_notifier);
-
-       return 0;
 }
 #endif