From: tip-bot for Mike Galbraith <efault@gmx.de>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
peterz@infradead.org, efault@gmx.de, sfr@canb.auug.org.au,
tglx@linutronix.de, mingo@elte.hu
Subject: [tip:sched/core] sched: Fix UP update_avg() build warning
Date: Thu, 15 Apr 2010 09:18:37 GMT [thread overview]
Message-ID: <tip-09a40af5240de02d848247ab82440ad75b31ab11@git.kernel.org> (raw)
In-Reply-To: <1271309399.14779.17.camel@marge.simson.net>
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
/***
prev parent reply other threads:[~2010-04-15 9:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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-bot for Mike Galbraith [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-09a40af5240de02d848247ab82440ad75b31ab11@git.kernel.org \
--to=efault@gmx.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=sfr@canb.auug.org.au \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®