linux-stable/drivers/cpufreq
Greg Kroah-Hartman 449b8bdcde cpufreq: brcmstb-avs-cpufreq: fix up "add check for cpufreq_cpu_get's return value"
In commit 9127599c07 ("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 <harshit.m.mogalapalli@oracle.com>
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Fixes: 9127599c07 ("cpufreq: brcmstb-avs-cpufreq: add check for cpufreq_cpu_get's return value")
Cc: Anastasia Belova <abelova@astralinux.ru>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-13 12:58:47 +02:00
..
Kconfig cpufreq: Avoid configuring old governors as default with intel_pstate 2020-10-27 18:45:34 +01:00
Kconfig.arm cpufreq: imx: fix NVMEM_IMX_OCOTP dependency 2020-12-30 11:53:39 +01:00
Kconfig.powerpc
Kconfig.x86 treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm 2020-08-04 12:44:53 +02:00
acpi-cpufreq.c cpufreq: ACPI: Set cpuinfo.max_freq directly if max boost is known 2021-03-04 11:38:22 +01:00
amd_freq_sensitivity.c cpufreq: amd_freq_sensitivity: Add missing pci_dev_put() 2023-01-14 10:15:18 +01:00
armada-8k-cpufreq.c cpufreq: ap806: Add missing MODULE_DEVICE_TABLE 2020-12-30 11:53:37 +01:00
armada-37xx-cpufreq.c cpufreq: armada-37xx: stop using 0 as NULL pointer 2023-02-01 08:23:17 +01:00
bmips-cpufreq.c
brcmstb-avs-cpufreq.c cpufreq: brcmstb-avs-cpufreq: fix up "add check for cpufreq_cpu_get's return value" 2024-04-13 12:58:47 +02:00
cppc_cpufreq.c cpufreq: CPPC: Reuse caps variable in few routines 2020-07-30 10:57:47 +05:30
cpufreq-dt-platdev.c cpufreq: Use of_property_present() for testing DT property presence 2024-01-25 14:37:40 -08:00
cpufreq-dt.c cpufreq: dt: always allocate zeroed cpumask 2024-04-13 12:58:40 +02:00
cpufreq-dt.h
cpufreq-nforce2.c
cpufreq.c cpufreq: Fix the race condition while updating the transition_task of policy 2023-09-19 12:20:20 +02:00
cpufreq_conservative.c cpufreq: Register governors at core_initcall 2020-07-02 13:03:30 +02:00
cpufreq_governor.c cpufreq: cpufreq_governor: Demote store_sampling_rate() header to standard comment block 2020-07-15 15:17:06 +02:00
cpufreq_governor.h cpufreq: Introduce governor flags 2020-11-10 18:31:17 +01:00
cpufreq_governor_attr_set.c cpufreq: schedutil: Destroy mutex before kobject_put() frees the memory 2021-10-06 15:55:46 +02:00
cpufreq_ondemand.c cpufreq: Register governors at core_initcall 2020-07-02 13:03:30 +02:00
cpufreq_ondemand.h
cpufreq_performance.c cpufreq: Introduce CPUFREQ_GOV_STRICT_TARGET 2020-11-10 18:31:17 +01:00
cpufreq_powersave.c cpufreq: Introduce CPUFREQ_GOV_STRICT_TARGET 2020-11-10 18:31:17 +01:00
cpufreq_stats.c cpufreq: stats: Fix buffer overflow detection in trans_stats() 2023-11-28 16:54:59 +00:00
cpufreq_userspace.c cpufreq: Register governors at core_initcall 2020-07-02 13:03:30 +02:00
davinci-cpufreq.c cpufreq: Replace HTTP links with HTTPS ones 2020-07-13 17:54:37 +02:00
e_powersaver.c cpufreq: e_powersaver: remove unreachable break 2020-10-27 18:42:54 +01:00
elanfreq.c
freq_table.c cpufreq: ACPI: Set cpuinfo.max_freq directly if max boost is known 2021-03-04 11:38:22 +01:00
gx-suspmod.c
highbank-cpufreq.c cpufreq: highbank: Add missing MODULE_DEVICE_TABLE 2020-12-30 11:53:38 +01:00
ia64-acpi-cpufreq.c
imx-cpufreq-dt.c cpufreq: Use of_property_present() for testing DT property presence 2024-01-25 14:37:40 -08:00
imx6q-cpufreq.c cpufreq: Use of_property_present() for testing DT property presence 2024-01-25 14:37:40 -08:00
intel_pstate.c cpufreq: intel_pstate: Drop ACPI _PSS states table patching 2023-08-11 11:57:44 +02:00
kirkwood-cpufreq.c
longhaul.c cpufreq: e_powersaver: remove unreachable break 2020-10-27 18:42:54 +01:00
longhaul.h
longrun.c
loongson1-cpufreq.c cpufreq: loongson1: Add missing MODULE_ALIAS 2020-12-30 11:53:38 +01:00
loongson2_cpufreq.c
maple-cpufreq.c
mediatek-cpufreq.c cpufreq: mediatek: Unregister platform device on exit 2022-06-09 10:21:19 +02:00
mvebu-cpufreq.c
omap-cpufreq.c OPP: refactor dev_pm_opp_of_register_em() and update related drivers 2020-06-24 17:16:42 +02:00
p4-clockmod.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
pasemi-cpufreq.c cpufreq: pasemi: Include header file for {check,restore}_astate prototypes 2020-07-15 15:17:06 +02:00
pcc-cpufreq.c cpufreq: pcc-cpufreq: Mark sometimes used ID structs as __maybe_unused 2020-07-15 15:17:06 +02:00
pmac32-cpufreq.c cpufreq: pmac32-cpufreq: Fix refcount leak bug 2022-07-21 21:20:14 +02:00
pmac64-cpufreq.c
powernow-k6.c
powernow-k7.c
powernow-k7.h
powernow-k8.c cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit() 2023-09-19 12:20:07 +02:00
powernow-k8.h
powernv-cpufreq.c cpufreq: powernv: Fix init_chip_info initialization in numa=off 2021-09-18 13:40:36 +02:00
ppc_cbe_cpufreq.c
ppc_cbe_cpufreq.h
ppc_cbe_cpufreq_pervasive.c
ppc_cbe_cpufreq_pmi.c
pxa2xx-cpufreq.c
pxa3xx-cpufreq.c
qcom-cpufreq-hw.c cpufreq: qcom-hw: Fix memory leak in qcom_cpufreq_hw_read_lut() 2023-01-14 10:15:16 +01:00
qcom-cpufreq-nvmem.c cpufreq: qcom: fix memory leak in error path 2022-10-30 09:41:15 +01:00
qoriq-cpufreq.c drivers: cpufreq: Add missing of_node_put() in qoriq-cpufreq.c 2022-07-07 17:52:20 +02:00
raspberrypi-cpufreq.c
s3c24xx-cpufreq-debugfs.c ARM: s3c: remove cpufreq header dependencies 2020-08-20 17:52:05 +02:00
s3c24xx-cpufreq.c cpufreq: s3c24xx: move low-level clk reg access into platform code 2020-08-20 17:53:22 +02:00
s3c64xx-cpufreq.c
s3c2410-cpufreq.c cpufreq: s3c24xx: move low-level clk reg access into platform code 2020-08-20 17:53:22 +02:00
s3c2412-cpufreq.c cpufreq: s3c24xx: move low-level clk reg access into platform code 2020-08-20 17:53:22 +02:00
s3c2416-cpufreq.c
s3c2440-cpufreq.c cpufreq: s3c24xx: move low-level clk reg access into platform code 2020-08-20 17:53:22 +02:00
s5pv210-cpufreq.c cpufreq: s5pv210: Use dev_err instead of pr_err in probe 2020-09-16 14:12:18 +05:30
sa1100-cpufreq.c
sa1110-cpufreq.c
sc520_freq.c
scmi-cpufreq.c cpufreq: scmi: process the result of devm_of_clk_add_hw_provider() 2024-01-25 14:37:40 -08:00
scpi-cpufreq.c cpufreq: scpi: Add missing MODULE_ALIAS 2020-12-30 11:53:38 +01:00
sfi-cpufreq.c
sh-cpufreq.c
sparc-us2e-cpufreq.c
sparc-us3-cpufreq.c
spear-cpufreq.c
speedstep-centrino.c
speedstep-ich.c
speedstep-lib.c cpufreq: speedstep: remove unneeded semicolon 2020-10-28 18:04:07 +01:00
speedstep-lib.h
speedstep-smi.c
sti-cpufreq.c cpufreq: st: Add missing MODULE_DEVICE_TABLE 2020-12-30 11:53:38 +01:00
sun50i-cpufreq-nvmem.c cpufreq: fix memory leak in sun50i_cpufreq_nvmem_probe 2022-05-09 09:05:03 +02:00
tango-cpufreq.c
tegra20-cpufreq.c cpufreq: Use of_property_present() for testing DT property presence 2024-01-25 14:37:40 -08:00
tegra124-cpufreq.c
tegra186-cpufreq.c cpufreq: tegra186: Fix get frequency callback 2020-11-17 10:04:21 +05:30
tegra194-cpufreq.c cpufreq: replace cpu_logical_map() with read_cpuid_mpir() 2020-08-21 20:17:01 +02:00
ti-cpufreq.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
vexpress-spc-cpufreq.c cpufreq: vexpress-spc: Add missing MODULE_ALIAS 2020-12-30 11:53:38 +01:00