Skip to contentSkip to conversation

sched/fair: make update_entity_lag static

PATCH New Arnd Bergmann 1 participant 1 message Jul 24, 2023 Scheduler

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/fair.c +1 -1
index b42e0a2cadbf4..7566e67e314b2 100644
@@ -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;
 
Signature · 1 line
2.39.2