public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched: fix undefined rt.c declarations
@ 2022-07-21 14:51 Ben Dooks
  2022-08-03  9:28 ` [tip: sched/urgent] sched/rt: Fix Sparse warnings due to " tip-bot2 for Ben Dooks
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks @ 2022-07-21 14:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: mingo, peterz, juri.lelli, vincent.guittot, Ben Dooks

There are several symbols defined in sched.h but get wrapped in the
CONFIG_CGROUP_SCHED even though dummy versions get built in rt.c and
therefore trigger the sparse warnings below. Fix this by moving them
outside the CONFIG_CGROUP_SCHED block.

kernel/sched/rt.c:309:6: warning: symbol 'unregister_rt_sched_group' was not declared. Should it be static?
kernel/sched/rt.c:311:6: warning: symbol 'free_rt_sched_group' was not declared. Should it be static?
kernel/sched/rt.c:313:5: warning: symbol 'alloc_rt_sched_group' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
---
 kernel/sched/sched.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 47b89a0fc6e5..8f97f342c560 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -480,9 +480,6 @@ extern void __refill_cfs_bandwidth_runtime(struct cfs_bandwidth *cfs_b);
 extern void start_cfs_bandwidth(struct cfs_bandwidth *cfs_b);
 extern void unthrottle_cfs_rq(struct cfs_rq *cfs_rq);
 
-extern void unregister_rt_sched_group(struct task_group *tg);
-extern void free_rt_sched_group(struct task_group *tg);
-extern int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent);
 extern void init_tg_rt_entry(struct task_group *tg, struct rt_rq *rt_rq,
 		struct sched_rt_entity *rt_se, int cpu,
 		struct sched_rt_entity *parent);
@@ -520,6 +517,10 @@ struct cfs_bandwidth { };
 
 #endif	/* CONFIG_CGROUP_SCHED */
 
+extern void unregister_rt_sched_group(struct task_group *tg);
+extern void free_rt_sched_group(struct task_group *tg);
+extern int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent);
+
 /* CFS-related fields in a runqueue */
 struct cfs_rq {
 	struct load_weight	load;
-- 
2.35.1


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

* [tip: sched/urgent] sched/rt: Fix Sparse warnings due to undefined rt.c declarations
  2022-07-21 14:51 [PATCH] sched: fix undefined rt.c declarations Ben Dooks
@ 2022-08-03  9:28 ` tip-bot2 for Ben Dooks
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Ben Dooks @ 2022-08-03  9:28 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Ben Dooks, Ingo Molnar, x86, linux-kernel

The following commit has been merged into the sched/urgent branch of tip:

Commit-ID:     87514b2c24f294c32e9e743b095541dcf43928f7
Gitweb:        https://git.kernel.org/tip/87514b2c24f294c32e9e743b095541dcf43928f7
Author:        Ben Dooks <ben-linux@fluff.org>
AuthorDate:    Thu, 21 Jul 2022 15:51:55 +01:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Wed, 03 Aug 2022 11:22:37 +02:00

sched/rt: Fix Sparse warnings due to undefined rt.c declarations

There are several symbols defined in kernel/sched/sched.h but get wrapped
in CONFIG_CGROUP_SCHED, even though dummy versions get built in rt.c and
therefore trigger Sparse warnings:

  kernel/sched/rt.c:309:6: warning: symbol 'unregister_rt_sched_group' was not declared. Should it be static?
  kernel/sched/rt.c:311:6: warning: symbol 'free_rt_sched_group' was not declared. Should it be static?
  kernel/sched/rt.c:313:5: warning: symbol 'alloc_rt_sched_group' was not declared. Should it be static?

Fix this by moving them outside the CONFIG_CGROUP_SCHED block.

[ mingo: Refreshed to the latest scheduler tree, tweaked changelog. ]

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20220721145155.358366-1-ben-linux@fluff.org
---
 kernel/sched/sched.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index aad7f5e..1429315 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -480,9 +480,6 @@ extern void __refill_cfs_bandwidth_runtime(struct cfs_bandwidth *cfs_b);
 extern void start_cfs_bandwidth(struct cfs_bandwidth *cfs_b);
 extern void unthrottle_cfs_rq(struct cfs_rq *cfs_rq);
 
-extern void unregister_rt_sched_group(struct task_group *tg);
-extern void free_rt_sched_group(struct task_group *tg);
-extern int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent);
 extern void init_tg_rt_entry(struct task_group *tg, struct rt_rq *rt_rq,
 		struct sched_rt_entity *rt_se, int cpu,
 		struct sched_rt_entity *parent);
@@ -520,6 +517,10 @@ struct cfs_bandwidth { };
 
 #endif	/* CONFIG_CGROUP_SCHED */
 
+extern void unregister_rt_sched_group(struct task_group *tg);
+extern void free_rt_sched_group(struct task_group *tg);
+extern int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent);
+
 /*
  * u64_u32_load/u64_u32_store
  *

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

end of thread, other threads:[~2022-08-03  9:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-21 14:51 [PATCH] sched: fix undefined rt.c declarations Ben Dooks
2022-08-03  9:28 ` [tip: sched/urgent] sched/rt: Fix Sparse warnings due to " tip-bot2 for Ben Dooks

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