diff options
author | Adrian Bunk <bunk@kernel.org> | 2007-11-09 16:39:39 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-11-09 16:39:39 -0500 |
commit | e6fe6649b4ec11aa3075e394b4d8743eebe1f64c (patch) | |
tree | e04e8b2206dfad58e784ea6e4550f98f318aff0b | |
parent | b82d9fdd848abfbe7263a4ecd9bbb55e575100a6 (diff) |
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 2cc789fef711..ee800e7a70de 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1988,6 +1988,14 @@ static inline void inc_syscw(struct task_struct *tsk) | |||
1988 | } | 1988 | } |
1989 | #endif | 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 | #endif /* __KERNEL__ */ | 1999 | #endif /* __KERNEL__ */ |
1992 | 2000 | ||
1993 | #endif | 2001 | #endif |
diff --git a/init/main.c b/init/main.c index f605a969ea61..80b04b6c5157 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include <linux/pid_namespace.h> | 56 | #include <linux/pid_namespace.h> |
57 | #include <linux/device.h> | 57 | #include <linux/device.h> |
58 | #include <linux/kthread.h> | 58 | #include <linux/kthread.h> |
59 | #include <linux/sched.h> | ||
59 | 60 | ||
60 | #include <asm/io.h> | 61 | #include <asm/io.h> |
61 | #include <asm/bugs.h> | 62 | #include <asm/bugs.h> |
@@ -747,11 +748,8 @@ __setup("nosoftlockup", nosoftlockup_setup); | |||
747 | static void __init do_pre_smp_initcalls(void) | 748 | static void __init do_pre_smp_initcalls(void) |
748 | { | 749 | { |
749 | extern int spawn_ksoftirqd(void); | 750 | extern int spawn_ksoftirqd(void); |
750 | #ifdef CONFIG_SMP | ||
751 | extern int migration_init(void); | ||
752 | 751 | ||
753 | migration_init(); | 752 | migration_init(); |
754 | #endif | ||
755 | spawn_ksoftirqd(); | 753 | spawn_ksoftirqd(); |
756 | if (!nosoftlockup) | 754 | if (!nosoftlockup) |
757 | spawn_softlockup_task(); | 755 | spawn_softlockup_task(); |
diff --git a/kernel/sched.c b/kernel/sched.c index e195a4229418..b18f231a4875 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -5650,7 +5650,7 @@ static struct notifier_block __cpuinitdata migration_notifier = { | |||
5650 | .priority = 10 | 5650 | .priority = 10 |
5651 | }; | 5651 | }; |
5652 | 5652 | ||
5653 | int __init migration_init(void) | 5653 | void __init migration_init(void) |
5654 | { | 5654 | { |
5655 | void *cpu = (void *)(long)smp_processor_id(); | 5655 | void *cpu = (void *)(long)smp_processor_id(); |
5656 | int err; | 5656 | int err; |
@@ -5660,8 +5660,6 @@ int __init migration_init(void) | |||
5660 | BUG_ON(err == NOTIFY_BAD); | 5660 | BUG_ON(err == NOTIFY_BAD); |
5661 | migration_call(&migration_notifier, CPU_ONLINE, cpu); | 5661 | migration_call(&migration_notifier, CPU_ONLINE, cpu); |
5662 | register_cpu_notifier(&migration_notifier); | 5662 | register_cpu_notifier(&migration_notifier); |
5663 | |||
5664 | return 0; | ||
5665 | } | 5663 | } |
5666 | #endif | 5664 | #endif |
5667 | 5665 | ||