* linux-next: build warning after merge of the final tree (tip tree related)
@ 2010-04-15 4:36 Stephen Rothwell
2010-04-15 5:29 ` Mike Galbraith
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2010-04-15 4:36 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
Cc: linux-next, linux-kernel, Mike Galbraith
[-- Attachment #1: Type: text/plain, Size: 453 bytes --]
Hi all,
After merging the final tree, today's linux-next build (powerpc
allnoconfig) produced this warning:
kernel/sched.c:1875: warning: 'update_avg' defined but not used
Introduced by commit e12f31d3e5d36328c7fbd0fce40a95e70b59152c ("sched:
Remove avg_overlap") which left the only call to this function protected
by CONFIG_SMP.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: linux-next: build warning after merge of the final tree (tip tree related)
2010-04-15 4:36 linux-next: build warning after merge of the final tree (tip tree related) Stephen Rothwell
@ 2010-04-15 5:29 ` Mike Galbraith
2010-04-15 6:17 ` Stephen Rothwell
2010-04-15 9:18 ` [tip:sched/core] sched: Fix UP update_avg() build warning tip-bot for Mike Galbraith
0 siblings, 2 replies; 4+ messages in thread
From: Mike Galbraith @ 2010-04-15 5:29 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
linux-next, linux-kernel
On Thu, 2010-04-15 at 14:36 +1000, Stephen Rothwell wrote:
> Hi all,
>
> After merging the final tree, today's linux-next build (powerpc
> allnoconfig) produced this warning:
>
> kernel/sched.c:1875: warning: 'update_avg' defined but not used
>
> Introduced by commit e12f31d3e5d36328c7fbd0fce40a95e70b59152c ("sched:
> Remove avg_overlap") which left the only call to this function protected
> by CONFIG_SMP.
Oops.
sched: fix UP update_avg() build warning.
update_avg() is only used for SMP builds, move it to the nearest SMP block.
Signed-off-by: Mike Galbraith <efault@gmx.de>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
diff --git a/kernel/sched.c b/kernel/sched.c
index 3acf694..95eaecc 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);
@@ -2289,6 +2283,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
/***
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: linux-next: build warning after merge of the final tree (tip tree related)
2010-04-15 5:29 ` Mike Galbraith
@ 2010-04-15 6:17 ` Stephen Rothwell
2010-04-15 9:18 ` [tip:sched/core] sched: Fix UP update_avg() build warning tip-bot for Mike Galbraith
1 sibling, 0 replies; 4+ messages in thread
From: Stephen Rothwell @ 2010-04-15 6:17 UTC (permalink / raw)
To: Mike Galbraith
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
linux-next, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 350 bytes --]
Hi Mike,
On Thu, 15 Apr 2010 07:29:59 +0200 Mike Galbraith <efault@gmx.de> wrote:
>
> Oops.
>
> sched: fix UP update_avg() build warning.
>
> update_avg() is only used for SMP builds, move it to the nearest SMP block.
Thanks.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:sched/core] sched: Fix UP update_avg() build warning
2010-04-15 5:29 ` Mike Galbraith
2010-04-15 6:17 ` Stephen Rothwell
@ 2010-04-15 9:18 ` tip-bot for Mike Galbraith
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Mike Galbraith @ 2010-04-15 9:18 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, peterz, efault, sfr, tglx, mingo
Commit-ID: 09a40af5240de02d848247ab82440ad75b31ab11
Gitweb: http://git.kernel.org/tip/09a40af5240de02d848247ab82440ad75b31ab11
Author: Mike Galbraith <efault@gmx.de>
AuthorDate: Thu, 15 Apr 2010 07:29:59 +0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 15 Apr 2010 09:36:47 +0200
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>
---
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
/***
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-04-15 9:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-15 4:36 linux-next: build warning after merge of the final tree (tip tree related) Stephen Rothwell
2010-04-15 5:29 ` Mike Galbraith
2010-04-15 6:17 ` Stephen Rothwell
2010-04-15 9:18 ` [tip:sched/core] sched: Fix UP update_avg() build warning tip-bot for Mike Galbraith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®