Skip to content

Commit d55ebae

Browse files
arndbPeter Zijlstra
authored andcommitted
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: 8a99b68 ("sched: Move SCHED_DEBUG sysctl to debugfs") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Vincent Guittot <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e2a1f85 commit d55ebae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/sched/fair.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ struct sched_entity *__pick_last_entity(struct cfs_rq *cfs_rq)
684684
/**************************************************************
685685
* Scheduling class statistics methods:
686686
*/
687-
687+
#ifdef CONFIG_SMP
688688
int sched_update_scaling(void)
689689
{
690690
unsigned int factor = get_update_sysctl_factor();
@@ -702,6 +702,7 @@ int sched_update_scaling(void)
702702
return 0;
703703
}
704704
#endif
705+
#endif
705706

706707
/*
707708
* delta /= w

0 commit comments

Comments
 (0)