From: Greg Kroah-Hartman Date: Wed, 27 Mar 2024 14:31:12 +0000 (+0100) Subject: 5.10-stable patches X-Git-Tag: v6.7.12~209 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d2c66893de148bc9e5f5964d5f33800cbb659af;p=thirdparty%2Fkernel%2Fstable-queue.git 5.10-stable patches added patches: cpufreq-brcmstb-avs-cpufreq-fix-up-add-check-for-cpufreq_cpu_get-s-return-value.patch --- diff --git a/queue-5.10/cpufreq-brcmstb-avs-cpufreq-fix-up-add-check-for-cpufreq_cpu_get-s-return-value.patch b/queue-5.10/cpufreq-brcmstb-avs-cpufreq-fix-up-add-check-for-cpufreq_cpu_get-s-return-value.patch new file mode 100644 index 00000000000..4963cee7ce7 --- /dev/null +++ b/queue-5.10/cpufreq-brcmstb-avs-cpufreq-fix-up-add-check-for-cpufreq_cpu_get-s-return-value.patch @@ -0,0 +1,55 @@ +From 6ae10467fb966d6efb10a13cafd47f8d2a264880 Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Wed, 27 Mar 2024 15:21:45 +0100 +Subject: cpufreq: brcmstb-avs-cpufreq: fix up "add check for cpufreq_cpu_get's return value" + +From: Greg Kroah-Hartman + +In commit 9127599c075c ("cpufreq: brcmstb-avs-cpufreq: add check for +cpufreq_cpu_get's return value"), build warnings occur because a +variable is created after some logic, resulting in: + +drivers/cpufreq/brcmstb-avs-cpufreq.c: In function 'brcm_avs_cpufreq_get': +drivers/cpufreq/brcmstb-avs-cpufreq.c:486:9: error: ISO C90 forbids mixed +declarations and code [-Werror=declaration-after-statement] + 486 | struct private_data *priv = policy->driver_data; + | ^~~~~~ +cc1: all warnings being treated as errors +make[2]: *** [scripts/Makefile.build:289: +drivers/cpufreq/brcmstb-avs-cpufreq.o] Error 1 +make[1]: *** [scripts/Makefile.build:552: drivers/cpufreq] Error 2 +make[1]: *** Waiting for unfinished jobs.... +make: *** [Makefile:1907: drivers] Error 2 + +Fix this up. + +Link: https://lore.kernel.org/r/e114d9e5-26af-42be-9baa-72c3a6ec8fe5@oracle.com +Link: https://lore.kernel.org/stable/20240327015023.GC7502@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net/T/#m15bff0fe96986ef780e848b4fff362bf8ea03f08 +Reported-by: Harshit Mogalapalli +Reported-by: Linux Kernel Functional Testing +Fixes: 9127599c075c ("cpufreq: brcmstb-avs-cpufreq: add check for cpufreq_cpu_get's return value") +Cc: Anastasia Belova +Cc: Viresh Kumar +Cc: Sasha Levin +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Greg Kroah-Hartman +--- + drivers/cpufreq/brcmstb-avs-cpufreq.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/cpufreq/brcmstb-avs-cpufreq.c ++++ b/drivers/cpufreq/brcmstb-avs-cpufreq.c +@@ -481,10 +481,11 @@ static bool brcm_avs_is_firmware_loaded( + static unsigned int brcm_avs_cpufreq_get(unsigned int cpu) + { + struct cpufreq_policy *policy = cpufreq_cpu_get(cpu); ++ struct private_data *priv; ++ + if (!policy) + return 0; +- struct private_data *priv = policy->driver_data; +- ++ priv = policy->driver_data; + cpufreq_cpu_put(policy); + + return brcm_avs_get_frequency(priv->base); diff --git a/queue-5.10/series b/queue-5.10/series index 23cf7691bf1..a627752125a 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -115,3 +115,4 @@ x86-stackprotector-32-make-the-canary-into-a-regular.patch x86-pm-work-around-false-positive-kmemleak-report-in.patch scripts-kernel-doc-fix-syntax-error-due-to-undeclared-args-variable.patch comedi-comedi_test-prevent-timers-rescheduling-during-deletion.patch +cpufreq-brcmstb-avs-cpufreq-fix-up-add-check-for-cpufreq_cpu_get-s-return-value.patch