sched: Fix missing prototype warnings
authorThomas Gleixner <tglx@linutronix.de>
Wed, 13 Apr 2022 13:31:02 +0000 (15:31 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 1 May 2022 08:03:43 +0000 (10:03 +0200)
A W=1 build emits more than a dozen missing prototype warnings related to
scheduler and scheduler specific includes.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220413133024.249118058@linutronix.de
include/linux/sched.h
kernel/sched/build_policy.c
kernel/sched/build_utility.c
kernel/sched/core.c
kernel/sched/deadline.c
kernel/sched/fair.c
kernel/sched/sched.h
kernel/sched/smp.h
kernel/stop_machine.c

index fc74ea2578b77edd310195bb372bd95fce108aeb..a27316f5f737c12faef8d8c6131f71533b227e44 100644 (file)
@@ -2388,4 +2388,6 @@ static inline void sched_core_free(struct task_struct *tsk) { }
 static inline void sched_core_fork(struct task_struct *p) { }
 #endif
 
+extern void sched_set_stop_task(int cpu, struct task_struct *stop);
+
 #endif
index e0104b45029ad10c79c74aae4663de21304dd064..d9dc9ab3773f2b9935f26cdfbf890b84132d2d82 100644 (file)
@@ -15,6 +15,7 @@
 /* Headers: */
 #include <linux/sched/clock.h>
 #include <linux/sched/cputime.h>
+#include <linux/sched/hotplug.h>
 #include <linux/sched/posix-timers.h>
 #include <linux/sched/rt.h>
 
@@ -31,6 +32,7 @@
 #include <uapi/linux/sched/types.h>
 
 #include "sched.h"
+#include "smp.h"
 
 #include "autogroup.h"
 #include "stats.h"
index eec0849b2aae54c5667e2b7ded24b65987848b63..99bdd96f454f4eba861b11b0aae6991d348dce0e 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/sched/debug.h>
 #include <linux/sched/isolation.h>
 #include <linux/sched/loadavg.h>
+#include <linux/sched/nohz.h>
 #include <linux/sched/mm.h>
 #include <linux/sched/rseq_api.h>
 #include <linux/sched/task_stack.h>
index 068c088e958440808f6f33856fcbf061e47c0b36..e644578bc8713245ab6ceb47a0f473599389cd79 100644 (file)
 #include <linux/topology.h>
 #include <linux/sched/clock.h>
 #include <linux/sched/cond_resched.h>
+#include <linux/sched/cputime.h>
 #include <linux/sched/debug.h>
+#include <linux/sched/hotplug.h>
+#include <linux/sched/init.h>
 #include <linux/sched/isolation.h>
 #include <linux/sched/loadavg.h>
 #include <linux/sched/mm.h>
index fb4255ae0b2c856ca677df3c84aab1ddceb134ae..6ae423627a7a7c5e832de8ae9854bb58463138c7 100644 (file)
@@ -1220,8 +1220,6 @@ int dl_runtime_exceeded(struct sched_dl_entity *dl_se)
        return (dl_se->runtime <= 0);
 }
 
-extern bool sched_rt_bandwidth_account(struct rt_rq *rt_rq);
-
 /*
  * This function implements the GRUB accounting rule:
  * according to the GRUB reclaiming algorithm, the runtime is
index 6ca054b11a16dd4294ea786fdf61b27a741774d0..bc9f6e94c84e29bf8db7ab0e6a4ac02876a912bd 100644 (file)
@@ -36,6 +36,7 @@
 #include <linux/sched/cond_resched.h>
 #include <linux/sched/cputime.h>
 #include <linux/sched/isolation.h>
+#include <linux/sched/nohz.h>
 
 #include <linux/cpuidle.h>
 #include <linux/interrupt.h>
index 762be73972bd85a56801a1d285ee8c88f3c006d4..4784898e8f83d80826b954e0baca3c8924339980 100644 (file)
@@ -1833,12 +1833,7 @@ static inline void dirty_sched_domain_sysctl(int cpu)
 #endif
 
 extern int sched_update_scaling(void);
-
-extern void flush_smp_call_function_from_idle(void);
-
-#else /* !CONFIG_SMP: */
-static inline void flush_smp_call_function_from_idle(void) { }
-#endif
+#endif /* CONFIG_SMP */
 
 #include "stats.h"
 
@@ -2315,6 +2310,7 @@ extern void resched_cpu(int cpu);
 
 extern struct rt_bandwidth def_rt_bandwidth;
 extern void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 runtime);
+extern bool sched_rt_bandwidth_account(struct rt_rq *rt_rq);
 
 extern void init_dl_bandwidth(struct dl_bandwidth *dl_b, u64 period, u64 runtime);
 extern void init_dl_task_timer(struct sched_dl_entity *dl_se);
index 9620e323162c8b8c1ac6edb928d22d8cbf301285..5719bf9280e99405fe882691c15b8c91fb5a8450 100644 (file)
@@ -7,3 +7,9 @@
 extern void sched_ttwu_pending(void *arg);
 
 extern void send_call_function_single_ipi(int cpu);
+
+#ifdef CONFIG_SMP
+extern void flush_smp_call_function_from_idle(void);
+#else
+static inline void flush_smp_call_function_from_idle(void) { }
+#endif
index cbc30271ea4dcbe5c234835838f2d4b8d62a8a4b..6da7b91af35364bb36206afa77f537c458f16081 100644 (file)
@@ -535,8 +535,6 @@ void stop_machine_park(int cpu)
        kthread_park(stopper->thread);
 }
 
-extern void sched_set_stop_task(int cpu, struct task_struct *stop);
-
 static void cpu_stop_create(unsigned int cpu)
 {
        sched_set_stop_task(cpu, per_cpu(cpu_stopper.thread, cpu));