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-next>] [day] [month] [year] [list]
Message-ID: <1349466595-27614-1-git-send-email-fabio.estevam@freescale.com>
Date:	Fri, 5 Oct 2012 16:49:54 -0300
From:	Fabio Estevam <fabio.estevam@...escale.com>
To:	<peterz@...radead.org>
CC:	<mingo@...hat.com>, <linux-kernel@...r.kernel.org>,
	<arnd@...db.de>, <festevam@...il.com>,
	Fabio Estevam <fabio.estevam@...escale.com>
Subject: [PATCH 1/2] sched: fair: Fix 'defined but not used' warning

commit 4ae834f767 (sched/numa: Implement NUMA home-node selection code)
caused the following warning on a !CONFIG_SMP system:

kernel/sched/fair.c:1013:13: warning: 'account_offnode_enqueue' defined but not used [-Wunused-function]

Since account_offnode_enqueue() is only used in a path that requires CONFIG_SMP
to be enabled, make its definition dependent on CONFIG_SMP.

Signed-off-by: Fabio Estevam <fabio.estevam@...escale.com>
---
 kernel/sched/fair.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index f586f17..b75a336 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -801,12 +801,14 @@ update_stats_curr_start(struct cfs_rq *cfs_rq, struct sched_entity *se)
 static unsigned long task_h_load(struct task_struct *p);
 
 #ifdef CONFIG_SCHED_NUMA
+#ifdef CONFIG_SMP
 static void account_offnode_enqueue(struct rq *rq, struct task_struct *p)
 {
 	p->numa_contrib = task_h_load(p);
 	rq->offnode_weight += p->numa_contrib;
 	rq->offnode_running++;
 }
+#endif /* CONFIG_SMP */
 
 static void account_offnode_dequeue(struct rq *rq, struct task_struct *p)
 {
@@ -1010,9 +1012,11 @@ void task_tick_numa(struct rq *rq, struct task_struct *curr)
 	}
 }
 #else
+#ifdef CONFIG_SMP
 static void account_offnode_enqueue(struct rq *rq, struct task_struct *p)
 {
 }
+#endif /* CONFIG_SMP */
 
 static void account_offnode_dequeue(struct rq *rq, struct task_struct *p)
 {
-- 
1.7.9.5


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