diff options
author | Adrian Bunk <bunk@kernel.org> | 2007-11-09 22:39:39 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-11-09 22:39:39 +0100 |
commit | e6fe6649b4ec11aa3075e394b4d8743eebe1f64c (patch) | |
tree | e04e8b2206dfad58e784ea6e4550f98f318aff0b | |
parent | b82d9fdd848abfbe7263a4ecd9bbb55e575100a6 (diff) | |
download | kernel_samsung_crespo-e6fe6649b4ec11aa3075e394b4d8743eebe1f64c.zip kernel_samsung_crespo-e6fe6649b4ec11aa3075e394b4d8743eebe1f64c.tar.gz kernel_samsung_crespo-e6fe6649b4ec11aa3075e394b4d8743eebe1f64c.tar.bz2 |
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>
-rw-r--r-- | include/linux/sched.h | 8 | ||||
-rw-r--r-- | init/main.c | 4 | ||||
-rw-r--r-- | kernel/sched.c | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 2cc789f..ee800e7 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -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 diff --git a/init/main.c b/init/main.c index f605a96..80b04b6 100644 --- a/init/main.c +++ b/init/main.c @@ -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(); diff --git a/kernel/sched.c b/kernel/sched.c index e195a42..b18f231 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -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 |