Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cpufreq: armada-8k: Avoid excessive stack usage

In some build configurations (e.g. x86 allmodconfig), 2 cpu_mask
variables exceeds the max stack frame size:

drivers/cpufreq/armada-8k-cpufreq.c:203:1: error: the frame size of 2128 bytes is larger than 2048 bytes

Fix it by making "cpus" static which is fine given that module init is
only called once.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

authored by

Rob Herring (Arm) and committed by
Viresh Kumar
1ffec650 b81f9703

+1 -1
+1 -1
drivers/cpufreq/armada-8k-cpufreq.c
··· 132 132 int ret = 0, opps_index = 0, cpu, nb_cpus; 133 133 struct freq_table *freq_tables; 134 134 struct device_node *node; 135 - struct cpumask cpus; 135 + static struct cpumask cpus; 136 136 137 137 node = of_find_matching_node_and_match(NULL, armada_8k_cpufreq_of_match, 138 138 NULL);