kernel/sched/fair.c defines a stub version of init_cfs_bandwidth when CONFIG_CFS_BANDWIDTH=n. A few other places in the scheduler call init_cfs_bandwidth, but only when CONFIG_FAIR_GROUP_SCHED=y, and kernel/sched/sched.h only prototypes init_cfs_bandwidth when CONFIG_FAIR_GROUP_SCHED=y. Wrap the stub in an ifdef CONFIG_FAIR_GROUP_SCHED as well, to avoid defining it when not needed, and to satisfy GCC (-Wmissing-prototypes) and Sparse (-Wdecl).
kernel/sched/fair.c:2098:6: warning: no previous prototype for ‘init_cfs_bandwidth’ [-Wmissing-prototypes] Signed-off-by: Josh Triplett <j...@joshtriplett.org> --- kernel/sched/fair.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 7e29e80..0f03bf1 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -2095,9 +2095,8 @@ static inline int throttled_lb_pair(struct task_group *tg, return 0; } -void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {} - #ifdef CONFIG_FAIR_GROUP_SCHED +void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {} static void init_cfs_rq_runtime(struct cfs_rq *cfs_rq) {} #endif -- 1.7.10.4 -- 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/