2023-07-24 20:45:22

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH] sched/fair: make update_entity_lag static

From: Arnd Bergmann <[email protected]>

The newly introduced function is only used in this one file, so we
get a warning when it is in the global namespace:

kernel/sched/fair.c:702:6: warning: no previous prototype for function 'update_entity_lag' [-Wmissing-prototypes]
void update_entity_lag(struct cfs_rq *cfs_rq, struct sched_entity *se)
kernel/sched/fair.c:702:1: note: declare 'static' if the function is not intended to be used outside of this translation unit

Fixes: 86bfbb7ce4f67 ("sched/fair: Add lag based placement")
Signed-off-by: Arnd Bergmann <[email protected]>
---
kernel/sched/fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index b42e0a2cadbf4..7566e67e314b2 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -699,7 +699,7 @@ u64 avg_vruntime(struct cfs_rq *cfs_rq)
*
* XXX could add max_slice to the augmented data to track this.
*/
-void update_entity_lag(struct cfs_rq *cfs_rq, struct sched_entity *se)
+static void update_entity_lag(struct cfs_rq *cfs_rq, struct sched_entity *se)
{
s64 lag, limit;

--
2.39.2