Commit 8ee3f8e038d4261f70940364415c0680f4014eb6
Committed by
Rafael J. Wysocki
1 parent
4a511de96d
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
pxa3xx-cpufreq.c: Avoid using ARRAY_AND_SIZE(e) as a function argument
Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e) ,...) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Showing 1 changed file with 4 additions and 2 deletions Side-by-side Diff
drivers/cpufreq/pxa3xx-cpufreq.c
... | ... | @@ -213,10 +213,12 @@ |
213 | 213 | policy->cur = policy->min = policy->max; |
214 | 214 | |
215 | 215 | if (cpu_is_pxa300() || cpu_is_pxa310()) |
216 | - ret = setup_freqs_table(policy, ARRAY_AND_SIZE(pxa300_freqs)); | |
216 | + ret = setup_freqs_table(policy, pxa300_freqs, | |
217 | + ARRAY_SIZE(pxa300_freqs)); | |
217 | 218 | |
218 | 219 | if (cpu_is_pxa320()) |
219 | - ret = setup_freqs_table(policy, ARRAY_AND_SIZE(pxa320_freqs)); | |
220 | + ret = setup_freqs_table(policy, pxa320_freqs, | |
221 | + ARRAY_SIZE(pxa320_freqs)); | |
220 | 222 | |
221 | 223 | if (ret) { |
222 | 224 | pr_err("failed to setup frequency table\n"); |