lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-09a40af5240de02d848247ab82440ad75b31ab11@git.kernel.org>
Date:	Thu, 15 Apr 2010 09:18:37 GMT
From:	tip-bot for Mike Galbraith <efault@....de>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	peterz@...radead.org, efault@....de, sfr@...b.auug.org.au,
	tglx@...utronix.de, mingo@...e.hu
Subject: [tip:sched/core] sched: Fix UP update_avg() build warning

Commit-ID:  09a40af5240de02d848247ab82440ad75b31ab11
Gitweb:     http://git.kernel.org/tip/09a40af5240de02d848247ab82440ad75b31ab11
Author:     Mike Galbraith <efault@....de>
AuthorDate: Thu, 15 Apr 2010 07:29:59 +0200
Committer:  Ingo Molnar <mingo@...e.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@...b.auug.org.au>
Signed-off-by: Mike Galbraith <efault@....de>
Cc: Peter Zijlstra <peterz@...radead.org>
LKML-Reference: <1271309399.14779.17.camel@...ge.simson.net>
Signed-off-by: Ingo Molnar <mingo@...e.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
 
 /***
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ