[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220907092353.65757-1-chenzhang@kylinos.cn>
Date: Wed, 7 Sep 2022 17:23:53 +0800
From: chen zhang <chenzhang@...inos.cn>
To: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
bristot@...hat.com, vschneid@...hat.com
Cc: chenzhang_0901@....com, linux-kernel@...r.kernel.org,
chen zhang <chenzhang@...inos.cn>
Subject: [PATCH] sched/fair: fix a -Wmissing-prototypes warning
We get a warning when building kernel with W=1:
kernel/sched/fair.c:11510:6: warning: no previous prototype for ‘task_vruntime_update’ [-Werror=missing-prototypes]
Add the missing declaration in head file to fix this. And remove
the unnecessary declaration in kernel/sched/core.c.
Signed-off-by: chen zhang <chenzhang@...inos.cn>
---
kernel/sched/core.c | 2 --
kernel/sched/sched.h | 2 ++
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index b60422300af6..5a354b4bcd0c 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5874,8 +5874,6 @@ static inline struct task_struct *pick_task(struct rq *rq)
BUG(); /* The idle class should always have a runnable task. */
}
-extern void task_vruntime_update(struct rq *rq, struct task_struct *p, bool in_fi);
-
static void queue_core_balance(struct rq *rq);
static struct task_struct *
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index f616e0cec20c..ae8554356108 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -2268,6 +2268,8 @@ static inline bool sched_fair_runnable(struct rq *rq)
extern struct task_struct *pick_next_task_fair(struct rq *rq, struct task_struct *prev, struct rq_flags *rf);
extern struct task_struct *pick_next_task_idle(struct rq *rq);
+extern void task_vruntime_update(struct rq *rq, struct task_struct *p, bool in_fi);
+
#define SCA_CHECK 0x01
#define SCA_MIGRATE_DISABLE 0x02
#define SCA_MIGRATE_ENABLE 0x04
--
2.25.1
Powered by blists - more mailing lists