Andrew Morton reported these allnoconfig warnings:
kernel/sched/fair.c:800: warning: 'task_h_load' declared 'static' but never defined
kernel/sched/fair.c:1004: warning: 'account_numa_enqueue' defined but not used
These are only used on CONFIG_SMP - fix it.
We should eventually resolve the Kconfig complexities here by turning
SMP (and NUMA) scheduling either into a separate source code file, or
by creating a single-model scheduler, which happens to build to a small
object file on !CONFIG_SMP or !CONFIG_NUMA kernels not via #ifdefs but
via more clever build time code elimination and zero-size data fields.
That's not a simple patch.
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Link: http://lkml.kernel.org/n/tip-wyctbug9qKulTs0umsxjyixi@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
* have.
*/
+#ifdef CONFIG_SMP
static unsigned long task_h_load(struct task_struct *p);
+#endif
#ifdef CONFIG_SCHED_NUMA
static struct list_head *account_numa_enqueue(struct rq *rq, struct task_struct *p)
}
}
#else
+#ifdef CONFIG_SMP
static struct list_head *account_numa_enqueue(struct rq *rq, struct task_struct *p)
{
return NULL;
}
+#endif
static void account_numa_dequeue(struct rq *rq, struct task_struct *p)
{
static inline void update_h_load(long cpu)
{
}
-
+#ifdef CONFIG_SMP
static unsigned long task_h_load(struct task_struct *p)
{
return p->se.load.weight;
}
#endif
+#endif
/********** Helpers for find_busiest_group ************************/
/*