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.este...@freescale.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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to