diff options
author | Arnd Bergmann <arnd@arndb.de> | 2023-05-22 21:50:17 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2023-05-30 22:46:24 +0200 |
commit | d55ebae3f3122b07689cc4c34043114e09ce904c (patch) | |
tree | 027360859d868ca623046372136bbbf55487cab0 /kernel/sched | |
parent | e2a1f85bf9f509afd09b5d3308e3489b65845c28 (diff) |
sched: Hide unused sched_update_scaling()
This function is only used when CONFIG_SMP is enabled, without that there
is no caller and no prototype:
kernel/sched/fair.c:688:5: error: no previous prototype for 'sched_update_scaling' [-Werror=missing-prototypes
Hide the definition in the same #ifdef check as the declaration.
Fixes: 8a99b6833c88 ("sched: Move SCHED_DEBUG sysctl to debugfs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20230522195021.3456768-2-arnd@kernel.org
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | kernel/sched/fair.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 48b6f0ca13ac..2c1b345c3b8d 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -684,7 +684,7 @@ struct sched_entity *__pick_last_entity(struct cfs_rq *cfs_rq) /************************************************************** * Scheduling class statistics methods: */ - +#ifdef CONFIG_SMP int sched_update_scaling(void) { unsigned int factor = get_update_sysctl_factor(); @@ -702,6 +702,7 @@ int sched_update_scaling(void) return 0; } #endif +#endif /* * delta /= w |