linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: linux-next: build warning after merge of the final tree (tip tree related)
Date: Thu, 15 Apr 2010 07:29:59 +0200	[thread overview]
Message-ID: <1271309399.14779.17.camel@marge.simson.net> (raw)
In-Reply-To: <20100415143609.834da268.sfr@canb.auug.org.au>

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
 
 /***

  reply	other threads:[~2010-04-15  5:30 UTC|newest]

Thread overview: 10+ 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 [this message]
2010-04-15  6:17   ` Stephen Rothwell
2010-10-11  5:04 Stephen Rothwell
2010-10-11 17:09 ` Yinghai Lu
2010-10-11 19:00   ` H. Peter Anvin
2010-10-11 19:34     ` Yinghai Lu
2013-03-12  4:42 Stephen Rothwell
2013-03-12  5:16 ` Li Zefan
2013-03-12  5:45   ` Stephen Rothwell

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=1271309399.14779.17.camel@marge.simson.net \
    --to=efault@gmx.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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;
as well as URLs for NNTP newsgroup(s).