]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 May 2023 22:57:48 +0000 (07:57 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 May 2023 22:57:48 +0000 (07:57 +0900)
added patches:
sched-fix-debug-schedstats-warn.patch

queue-5.15/sched-fix-debug-schedstats-warn.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/sched-fix-debug-schedstats-warn.patch b/queue-5.15/sched-fix-debug-schedstats-warn.patch
new file mode 100644 (file)
index 0000000..fdf7841
--- /dev/null
@@ -0,0 +1,41 @@
+From 769fdf83df57b373660343ef4270b3ada91ef434 Mon Sep 17 00:00:00 2001
+From: Peter Zijlstra <peterz@infradead.org>
+Date: Wed, 6 Oct 2021 10:12:05 +0200
+Subject: sched: Fix DEBUG && !SCHEDSTATS warn
+
+From: Peter Zijlstra <peterz@infradead.org>
+
+commit 769fdf83df57b373660343ef4270b3ada91ef434 upstream.
+
+When !SCHEDSTATS schedstat_enabled() is an unconditional 0 and the
+whole block doesn't exist, however GCC figures the scoped variable
+'stats' is unused and complains about it.
+
+Upgrade the warning from -Wunused-variable to -Wunused-but-set-variable
+by writing it in two statements. This fixes the build because the new
+warning is in W=1.
+
+Given that whole if(0) {} thing, I don't feel motivated to change
+things overly much and quite strongly feel this is the compiler being
+daft.
+
+Fixes: cb3e971c435d ("sched: Make struct sched_statistics independent of fair sched class")
+Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
+Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ kernel/sched/debug.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/kernel/sched/debug.c
++++ b/kernel/sched/debug.c
+@@ -462,7 +462,8 @@ static void print_cfs_group_stats(struct
+       PN(se->sum_exec_runtime);
+       if (schedstat_enabled()) {
+-               struct sched_statistics *stats =  __schedstats_from_se(se);
++              struct sched_statistics *stats;
++              stats = __schedstats_from_se(se);
+               PN_SCHEDSTAT(wait_start);
+               PN_SCHEDSTAT(sleep_start);
index d28b76e646f7649e4382bc3f01b724499eb58879..5d152ee05c8835f21c54d89a1e82942455f93fab 100644 (file)
@@ -369,3 +369,4 @@ debugobject-ensure-pool-refill-again.patch
 sound-oss-dmasound-fix-dmasound_setup-defined-but-not-used.patch
 arm64-dts-qcom-sdm845-correct-dynamic-power-coefficients.patch
 netfilter-nf_tables-deactivate-anonymous-set-from-preparation-phase.patch
+sched-fix-debug-schedstats-warn.patch