aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi Zefan <lizefan@huawei.com>2013-03-06 21:00:26 -0500
committerIngo Molnar <mingo@kernel.org>2013-03-11 04:07:24 -0400
commitb719203b846284e77f5c50fca04b458b6484aeae (patch)
tree31b2f3616890dee7265dc258a66a4266e1f95aac
parent4e3da46797f8e4d8217d2e3d6857444391b306da (diff)
sched: Fix update_group_power() prototype placement to fix build warning when !CONFIG_SMP
All warnings: In file included from kernel/sched/core.c:85:0: kernel/sched/sched.h:1036:39: warning: 'struct sched_domain' declared inside parameter list kernel/sched/sched.h:1036:39: warning: its scope is only this definition or declaration, which is probably not what you want It's because struct sched_domain is defined inside #if CONFIG_SMP, while update_group_power() is declared unconditionally. Fix this warning by declaring update_group_power() only if CONFIG_SMP=n. Build tested with CONFIG_SMP enabled and then disabled. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Li Zefan <lizefan@huawei.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/5137F4BA.2060101@huawei.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--kernel/sched/sched.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 30bebb955023..3bd15a43eebc 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -1026,6 +1026,8 @@ extern const struct sched_class idle_sched_class;
1026 1026
1027#ifdef CONFIG_SMP 1027#ifdef CONFIG_SMP
1028 1028
1029extern void update_group_power(struct sched_domain *sd, int cpu);
1030
1029extern void trigger_load_balance(struct rq *rq, int cpu); 1031extern void trigger_load_balance(struct rq *rq, int cpu);
1030extern void idle_balance(int this_cpu, struct rq *this_rq); 1032extern void idle_balance(int this_cpu, struct rq *this_rq);
1031 1033
@@ -1040,7 +1042,6 @@ static inline void idle_balance(int cpu, struct rq *rq)
1040extern void sysrq_sched_debug_show(void); 1042extern void sysrq_sched_debug_show(void);
1041extern void sched_init_granularity(void); 1043extern void sched_init_granularity(void);
1042extern void update_max_interval(void); 1044extern void update_max_interval(void);
1043extern void update_group_power(struct sched_domain *sd, int cpu);
1044extern int update_runtime(struct notifier_block *nfb, unsigned long action, void *hcpu); 1045extern int update_runtime(struct notifier_block *nfb, unsigned long action, void *hcpu);
1045extern void init_sched_rt_class(void); 1046extern void init_sched_rt_class(void);
1046extern void init_sched_fair_class(void); 1047extern void init_sched_fair_class(void);