The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH sched_ext/for-7.1-fixes] sched_ext: Fix !CONFIG_EXT_SUB_SCHED build warnings
@ 2026-05-08  0:16 Tejun Heo
  2026-05-08  0:20 ` Tejun Heo
  2026-05-08  5:28 ` Andrea Righi
  0 siblings, 2 replies; 3+ messages in thread
From: Tejun Heo @ 2026-05-08  0:16 UTC (permalink / raw)
  To: David Vernet, Andrea Righi, Changwoo Min
  Cc: Emil Tsalapatis, sched-ext, linux-kernel

W=1 with CONFIG_EXT_SUB_SCHED=n flags 'err_msg' uninitialized and
'err_free_lb_resched' unused. Initialize err_msg and gate the label.

Signed-off-by: Tejun Heo <tj@kernel.org>
---
 kernel/sched/ext.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 48b4834c7027..f4e2db8e56be 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -5584,7 +5584,7 @@ static void refresh_watchdog(void)

 static s32 scx_link_sched(struct scx_sched *sch)
 {
-	const char *err_msg;
+	const char *err_msg = "";
 	s32 ret = 0;

 	scoped_guard(raw_spinlock_irq, &scx_sched_lock) {
@@ -6652,8 +6652,10 @@ static struct scx_sched *scx_alloc_and_add_sched(struct sched_ext_ops *ops,
 #endif	/* CONFIG_EXT_SUB_SCHED */
 	return sch;

+#ifdef CONFIG_EXT_SUB_SCHED
 err_free_lb_resched:
 	free_cpumask_var(sch->bypass_lb_resched_cpumask);
+#endif
 err_free_lb_cpumask:
 	free_cpumask_var(sch->bypass_lb_donee_cpumask);
 err_stop_helper:

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-08  0:16 [PATCH sched_ext/for-7.1-fixes] sched_ext: Fix !CONFIG_EXT_SUB_SCHED build warnings Tejun Heo
2026-05-08  0:20 ` Tejun Heo
2026-05-08  5:28 ` Andrea Righi

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