Re: [PATCH] sched/fair: make function static to avoid compile warnings

From: Peter Zijlstra
Date: Tue Jun 05 2018 - 10:16:28 EST


On Tue, Jun 05, 2018 at 01:46:59PM +0000, yang wrote:
> Fix compile warnings:
> CC kernel/sched/fair.o
> kernel/sched/fair.c:2461:6: warning: no previous prototype for âtask_numa_workâ [-Wmissing-prototypes]
> void task_numa_work(struct callback_head *work)
> ^
> kernel/sched/fair.c:2606:6: warning: no previous prototype for âtask_tick_numaâ [-Wmissing-prototypes]
> void task_tick_numa(struct rq *rq, struct task_struct *curr)
> ^
> kernel/sched/fair.c:3853:6: warning: no previous prototype for âsync_entity_load_avgâ [-Wmissing-prototypes]
> void sync_entity_load_avg(struct sched_entity *se)
> ^
> kernel/sched/fair.c:3866:6: warning: no previous prototype for âremove_entity_load_avgâ [-Wmissing-prototypes]
> void remove_entity_load_avg(struct sched_entity *se)

What compiler does that? Seems like a pretty annoying warning.