mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched/fair: make update_entity_lag static
@ 2023-07-24 19:58 Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2023-07-24 19:58 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Arnd Bergmann, Ingo Molnar, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

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 <arnd@arndb.de>
---
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] sched/fair: Make update_entity_lag() static
@ 2023-08-29  3:03 Hao Jia
  0 siblings, 0 replies; 2+ messages in thread
From: Hao Jia @ 2023-08-29  3:03 UTC (permalink / raw)
  To: mingo, peterz, mingo, juri.lelli, vincent.guittot,
	dietmar.eggemann, rostedt, bsegall, mgorman, bristot, vschneid
  Cc: linux-kernel, Hao Jia

The function update_entity_lag() is only used inside file fair.c.
Make it static.

Signed-off-by: Hao Jia <jiahao.os@bytedance.com>
---
 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 911d0063763c..8dbff6e7ad4f 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-29  3:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-24 19:58 [PATCH] sched/fair: make update_entity_lag static Arnd Bergmann
2023-08-29  3:03 [PATCH] sched/fair: Make update_entity_lag() static Hao Jia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®