Skip to content

Commit b1b41bc

Browse files
arndbvireshk
authored andcommitted
cpufreq: armada-8k: make both cpu masks static
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. Fixes: 1ffec65 ("cpufreq: armada-8k: Avoid excessive stack usage") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
1 parent b0a86fb commit b1b41bc

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/cpufreq/armada-8k-cpufreq.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ static int __init armada_8k_cpufreq_init(void)
132132
int ret = 0, opps_index = 0, cpu, nb_cpus;
133133
struct freq_table *freq_tables;
134134
struct device_node *node;
135-
static struct cpumask cpus;
135+
static struct cpumask cpus, shared_cpus;
136136

137137
node = of_find_matching_node_and_match(NULL, armada_8k_cpufreq_of_match,
138138
NULL);
@@ -154,7 +154,6 @@ static int __init armada_8k_cpufreq_init(void)
154154
* divisions of it).
155155
*/
156156
for_each_cpu(cpu, &cpus) {
157-
struct cpumask shared_cpus;
158157
struct device *cpu_dev;
159158
struct clk *clk;
160159

0 commit comments

Comments
 (0)