cpufreq: armada-8k: make both cpu masks static
Subsystems (2)
PATCH 1/1 cpufreq: armada-8k: make both cpu masks static
From: Arnd Bergmann <[email protected]>
An earlier patch marked one of the two CPU masks as 'static' to reduce stack usage, but if CONFIG_NR_CPUS is large enough, the function still produces a warning for compile testing:
drivers/cpufreq/armada-8k-cpufreq.c: In function 'armada_8k_cpufreq_init':drivers/cpufreq/armada-8k-cpufreq.c:203:1: error: the frame size of 1416 bytes is larger than 1408 bytes [-Werror=frame-larger-than=]
Normally this should be done using alloc_cpumask_var(), but since the driver already has a static mask and the probe function is not called concurrently, use the same trick for both.
--- drivers/cpufreq/armada-8k-cpufreq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/cpufreq/armada-8k-cpufreq.c +1 -2
@@ -132,7 +132,7 @@ static int __init armada_8k_cpufreq_init(void)int ret =0 , opps_index =0 , cpu, nb_cpus;struct freq_table *freq_tables;struct device_node *node; -static struct cpumask cpus; +static struct cpumask cpus, shared_cpus; node =of_find_matching_node_and_match (NULL , armada_8k_cpufreq_of_match,NULL );
@@ -154,7 +154,6 @@ static int __init armada_8k_cpufreq_init(void)* divisions of it). */ for_each_cpu (cpu, &cpus) { -struct cpumask shared_cpus;struct device *cpu_dev;struct clk *clk;
Signature · 1 line
2.39.5
Quoted 13 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
An earlier patch marked one of the two CPU masks as 'static' to reduce stack usage, but if
CONFIG_NR_CPUSis large enough, the function still produces a warning for compile testing:
drivers/cpufreq/armada-8k-cpufreq.c: In function 'armada_8k_cpufreq_init':drivers/cpufreq/armada-8k-cpufreq.c:203:1: error: the frame size of 1416 bytes is larger than 1408 bytes [-Werror=frame-larger-than=]Normally this should be done using
alloc_cpumask_var(), but since the driver already has a static mask and the probe function is not called concurrently, use the same trick for both.
Quoted 5 lines
Fixes 1ffec650d07f ("cpufreq: armada-8k: Avoid excessive stack usage")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/cpufreq/armada-8k-cpufreq.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Applied. Thanks.
Signature · 1 line
viresh