Skip to content

Commit d664e39

Browse files
committed
sched: Fix missing prototype warnings
A W=1 build emits more than a dozen missing prototype warnings related to scheduler and scheduler specific includes. Reported-by: kernel test robot <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 97956dd commit d664e39

File tree

9 files changed

+17
-10
lines changed

9 files changed

+17
-10
lines changed

include/linux/sched.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2388,4 +2388,6 @@ static inline void sched_core_free(struct task_struct *tsk) { }
23882388
static inline void sched_core_fork(struct task_struct *p) { }
23892389
#endif
23902390

2391+
extern void sched_set_stop_task(int cpu, struct task_struct *stop);
2392+
23912393
#endif

kernel/sched/build_policy.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
/* Headers: */
1616
#include <linux/sched/clock.h>
1717
#include <linux/sched/cputime.h>
18+
#include <linux/sched/hotplug.h>
1819
#include <linux/sched/posix-timers.h>
1920
#include <linux/sched/rt.h>
2021

@@ -31,6 +32,7 @@
3132
#include <uapi/linux/sched/types.h>
3233

3334
#include "sched.h"
35+
#include "smp.h"
3436

3537
#include "autogroup.h"
3638
#include "stats.h"

kernel/sched/build_utility.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/sched/debug.h>
1515
#include <linux/sched/isolation.h>
1616
#include <linux/sched/loadavg.h>
17+
#include <linux/sched/nohz.h>
1718
#include <linux/sched/mm.h>
1819
#include <linux/sched/rseq_api.h>
1920
#include <linux/sched/task_stack.h>

kernel/sched/core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@
2626
#include <linux/topology.h>
2727
#include <linux/sched/clock.h>
2828
#include <linux/sched/cond_resched.h>
29+
#include <linux/sched/cputime.h>
2930
#include <linux/sched/debug.h>
31+
#include <linux/sched/hotplug.h>
32+
#include <linux/sched/init.h>
3033
#include <linux/sched/isolation.h>
3134
#include <linux/sched/loadavg.h>
3235
#include <linux/sched/mm.h>

kernel/sched/deadline.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,8 +1220,6 @@ int dl_runtime_exceeded(struct sched_dl_entity *dl_se)
12201220
return (dl_se->runtime <= 0);
12211221
}
12221222

1223-
extern bool sched_rt_bandwidth_account(struct rt_rq *rt_rq);
1224-
12251223
/*
12261224
* This function implements the GRUB accounting rule:
12271225
* according to the GRUB reclaiming algorithm, the runtime is

kernel/sched/fair.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <linux/sched/cond_resched.h>
3737
#include <linux/sched/cputime.h>
3838
#include <linux/sched/isolation.h>
39+
#include <linux/sched/nohz.h>
3940

4041
#include <linux/cpuidle.h>
4142
#include <linux/interrupt.h>

kernel/sched/sched.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1833,12 +1833,7 @@ static inline void dirty_sched_domain_sysctl(int cpu)
18331833
#endif
18341834

18351835
extern int sched_update_scaling(void);
1836-
1837-
extern void flush_smp_call_function_from_idle(void);
1838-
1839-
#else /* !CONFIG_SMP: */
1840-
static inline void flush_smp_call_function_from_idle(void) { }
1841-
#endif
1836+
#endif /* CONFIG_SMP */
18421837

18431838
#include "stats.h"
18441839

@@ -2315,6 +2310,7 @@ extern void resched_cpu(int cpu);
23152310

23162311
extern struct rt_bandwidth def_rt_bandwidth;
23172312
extern void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 runtime);
2313+
extern bool sched_rt_bandwidth_account(struct rt_rq *rt_rq);
23182314

23192315
extern void init_dl_bandwidth(struct dl_bandwidth *dl_b, u64 period, u64 runtime);
23202316
extern void init_dl_task_timer(struct sched_dl_entity *dl_se);

kernel/sched/smp.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,9 @@
77
extern void sched_ttwu_pending(void *arg);
88

99
extern void send_call_function_single_ipi(int cpu);
10+
11+
#ifdef CONFIG_SMP
12+
extern void flush_smp_call_function_from_idle(void);
13+
#else
14+
static inline void flush_smp_call_function_from_idle(void) { }
15+
#endif

kernel/stop_machine.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,6 @@ void stop_machine_park(int cpu)
535535
kthread_park(stopper->thread);
536536
}
537537

538-
extern void sched_set_stop_task(int cpu, struct task_struct *stop);
539-
540538
static void cpu_stop_create(unsigned int cpu)
541539
{
542540
sched_set_stop_task(cpu, per_cpu(cpu_stopper.thread, cpu));

0 commit comments

Comments
 (0)