@@ -2052,6 +2052,7 @@ static void destroy_cfs_bandwidth(struct cfs_bandwidth *cfs_b)
hrtimer_cancel(&cfs_b->slack_timer);
}
+#if defined CONFIG_SMP
static void unthrottle_offline_cfs_rqs(struct rq *rq)
{
struct cfs_rq *cfs_rq;
@@ -2071,6 +2072,7 @@ static void unthrottle_offline_cfs_rqs(struct rq *rq)
unthrottle_cfs_rq(cfs_rq);
}
}
+#endif /* CONFIG_SMP */
#else /* CONFIG_CFS_BANDWIDTH */
static __always_inline
@@ -2106,7 +2108,9 @@ static inline struct cfs_bandwidth *tg_cfs_bandwidth(struct task_group *tg)
return NULL;
}
static inline void destroy_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
+#if defined CONFIG_SMP
static inline void unthrottle_offline_cfs_rqs(struct rq *rq) {}
+#endif /* CONFIG_SMP */
#endif /* CONFIG_CFS_BANDWIDTH */
Since unthrottle_offline_cfs_rqs is only ever invoked when CONFIG_SMP let's pre-processor it out when SMP is not configured. This change suppresses the build error below when !CONFIG_SMP. kernel/sched/fair.c:2055:13: warning: ‘unthrottle_offline_cfs_rqs’ defined but not used [-Wunused-function] Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> --- kernel/sched/fair.c | 4 ++++ 1 file changed, 4 insertions(+)