diff options
author | Mike Galbraith <efault@gmx.de> | 2010-04-15 05:29:59 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-04-15 07:36:47 (GMT) |
commit | 09a40af5240de02d848247ab82440ad75b31ab11 (patch) | |
tree | 1f0fa5e5c391d8fbf76587f687d131f9b7ae4609 /kernel/sched.c | |
parent | b257c14ceb1194a6181144210056d38f22127189 (diff) | |
download | linux-09a40af5240de02d848247ab82440ad75b31ab11.tar.xz |
sched: Fix UP update_avg() build warning
update_avg() is only used for SMP builds, move it to the nearest
SMP block.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1271309399.14779.17.camel@marge.simson.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index ab562ae..de0da71 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1872,12 +1872,6 @@ static void set_load_weight(struct task_struct *p) p->se.load.inv_weight = prio_to_wmult[p->static_prio - MAX_RT_PRIO]; } -static void update_avg(u64 *avg, u64 sample) -{ - s64 diff = sample - *avg; - *avg += diff >> 3; -} - static void enqueue_task(struct rq *rq, struct task_struct *p, int flags) { update_rq_clock(rq); @@ -2332,6 +2326,12 @@ int select_task_rq(struct rq *rq, struct task_struct *p, int sd_flags, int wake_ return cpu; } + +static void update_avg(u64 *avg, u64 sample) +{ + s64 diff = sample - *avg; + *avg += diff >> 3; +} #endif /*** |