sched/numa: Hide numa_wake_affine() from UP build
authorThomas Gleixner <tglx@linutronix.de>
Thu, 29 Jun 2017 06:25:52 +0000 (08:25 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 29 Jun 2017 06:25:52 +0000 (08:25 +0200)
Stephen reported the following build warning in UP:

kernel/sched/fair.c:2657:9: warning: 'struct sched_domain' declared inside
parameter list
         ^
/home/sfr/next/next/kernel/sched/fair.c:2657:9: warning: its scope is only this
definition or declaration, which is probably not what you want

Hide the numa_wake_affine() inline stub on UP builds to get rid of it.

Fixes: 3fed382b46ba ("sched/numa: Implement NUMA node level wake_affine()")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Rik van Riel <riel@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
kernel/sched/fair.c

index 6f4f155adf5f9ce401df01b2b2b31c582ae50eba..008c514dc241a0cd6b44764fb430e9ae9a2c6537 100644 (file)
@@ -2652,12 +2652,14 @@ static inline void account_numa_dequeue(struct rq *rq, struct task_struct *p)
 {
 }
 
+#ifdef CONFIG_SMP
 static inline bool numa_wake_affine(struct sched_domain *sd,
                                    struct task_struct *p, int this_cpu,
                                    int prev_cpu, int sync)
 {
        return true;
 }
+#endif /* !SMP */
 #endif /* CONFIG_NUMA_BALANCING */
 
 static void