Skip to contentSkip to conversation

sched-fair-move-unused-stub-functions-to-header.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Dec 11, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: sched: fair: move unused stub functions to header
has been removed from the -mm tree. Its filename was
sched-fair-move-unused-stub-functions-to-header.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Arnd Bergmann <[email protected]>
Subject: sched: fair: move unused stub functions to header
Date: Thu, 23 Nov 2023 12:05:03 +0100

These four functions have a normal definition for CONFIG_FAIR_GROUP_SCHED, and empty one that is only referenced when FAIR_GROUP_SCHED is disabled but CGROUP_SCHED is still enabled. If both are turned off, the functions are still defined but the misisng prototype causes a W=1 warning:

kernel/sched/fair.c:12544:6: error: no previous prototype for 'free_fair_sched_group' kernel/sched/fair.c:12546:5: error: no previous prototype for 'alloc_fair_sched_group' kernel/sched/fair.c:12553:6: error: no previous prototype for 'online_fair_sched_group' kernel/sched/fair.c:12555:6: error: no previous prototype for 'unregister_fair_sched_group'

Move the alternatives into the header as static inline functions with the correct combination of #ifdef checks to avoid the warning without adding even more complexity.

[A different patch with the same description got applied by accident
and was later reverted, but the original patch is still missing]

Fixes 7aa55f2a5902 ("sched/fair: Move unused stub functions to header")
Cc "David S. Miller" <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Dinh Nguyen <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Ivan Kokshaysky <[email protected]>
Cc John Paul Adrian Glaubitz <[email protected]>
Cc Kees Cook <[email protected]>
Cc Masahiro Yamada <[email protected]>
Cc Matt Turner <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Nathan Chancellor <[email protected]>
Cc Nicolas Schier <[email protected]>
Cc Palmer Dabbelt <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Richard Henderson <[email protected]>
Cc Richard Weinberger <[email protected]>
Cc Rich Felker <[email protected]>
Cc Stephen Rothwell <[email protected]>
Cc Thomas Bogendoerfer <[email protected]>
Cc Tudor Ambarus <[email protected]>
Cc Yoshinori Sato <[email protected]>
Cc Zhihao Cheng <[email protected]>

---

 kernel/sched/fair.c  |   13 -------------
 kernel/sched/sched.h |   11 +++++++++++
 2 files changed, 11 insertions(+), 13 deletions(-)
kernel/sched/fair.c renamed from kernel/sched/fair.c~sched-fair-move-unused-stub-functions-to-header +0 -13
@@ -13036,19 +13036,6 @@ next_cpu:
 	return 0;
 }
 
-#else /* CONFIG_FAIR_GROUP_SCHED */
-
-void free_fair_sched_group(struct task_group *tg) { }
-
-int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
-{
-	return 1;
-}
-
-void online_fair_sched_group(struct task_group *tg) { }
-
-void unregister_fair_sched_group(struct task_group *tg) { }
-
 #endif /* CONFIG_FAIR_GROUP_SCHED */
 
 
kernel/sched/sched.h renamed from kernel/sched/sched.h~sched-fair-move-unused-stub-functions-to-header +11 -0
@@ -436,10 +436,21 @@ static inline int walk_tg_tree(tg_visito
 
 extern int tg_nop(struct task_group *tg, void *data);
 
+#ifdef CONFIG_FAIR_GROUP_SCHED
 extern void free_fair_sched_group(struct task_group *tg);
 extern int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent);
 extern void online_fair_sched_group(struct task_group *tg);
 extern void unregister_fair_sched_group(struct task_group *tg);
+#else
+static inline void free_fair_sched_group(struct task_group *tg) { }
+static inline int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
+{
+       return 1;
+}
+static inline void online_fair_sched_group(struct task_group *tg) { }
+static inline void unregister_fair_sched_group(struct task_group *tg) { }
+#endif
+
 extern void init_tg_cfs_entry(struct task_group *tg, struct cfs_rq *cfs_rq,
 			struct sched_entity *se, int cpu,
 			struct sched_entity *parent);

_

Patches currently in -mm which might be from [email protected] are

kexec-fix-kexec_file-dependencies.patch kexec-fix-kexec_file-dependencies-fix.patch kexec-select-crypto-from-kexec_file-instead-of-depending-on-it.patch makefileextrawarn-turn-on-missing-prototypes-globally.patch