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

cpufreq: vexpress-spc: fix some coding style issues

Fix the following checkpatch checks/warnings:

CHECK: Unnecessary parentheses around the code
CHECK: Alignment should match open parenthesis
CHECK: Prefer kernel type 'u32' over 'uint32_t'
WARNING: Missing a blank line after declarations

Acked-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

authored by

Sudeep Holla and committed by
Viresh Kumar
e318d2c8 09402d57

+18 -18
+18 -18
drivers/cpufreq/vexpress-spc-cpufreq.c
··· 79 79 for_each_online_cpu(j) { 80 80 cpu_freq = per_cpu(cpu_last_req_freq, j); 81 81 82 - if ((cluster == per_cpu(physical_cluster, j)) && 83 - (max_freq < cpu_freq)) 82 + if (cluster == per_cpu(physical_cluster, j) && 83 + max_freq < cpu_freq) 84 84 max_freq = cpu_freq; 85 85 } 86 86 ··· 190 190 freqs_new = freq_table[cur_cluster][index].frequency; 191 191 192 192 if (is_bL_switching_enabled()) { 193 - if ((actual_cluster == A15_CLUSTER) && 194 - (freqs_new < clk_big_min)) { 193 + if (actual_cluster == A15_CLUSTER && freqs_new < clk_big_min) 195 194 new_cluster = A7_CLUSTER; 196 - } else if ((actual_cluster == A7_CLUSTER) && 197 - (freqs_new > clk_little_max)) { 195 + else if (actual_cluster == A7_CLUSTER && 196 + freqs_new > clk_little_max) 198 197 new_cluster = A15_CLUSTER; 199 - } 200 198 } 201 199 202 200 ret = ve_spc_cpufreq_set_rate(cpu, actual_cluster, new_cluster, ··· 222 224 static inline u32 get_table_min(struct cpufreq_frequency_table *table) 223 225 { 224 226 struct cpufreq_frequency_table *pos; 225 - uint32_t min_freq = ~0; 227 + u32 min_freq = ~0; 228 + 226 229 cpufreq_for_each_entry(pos, table) 227 230 if (pos->frequency < min_freq) 228 231 min_freq = pos->frequency; ··· 234 235 static inline u32 get_table_max(struct cpufreq_frequency_table *table) 235 236 { 236 237 struct cpufreq_frequency_table *pos; 237 - uint32_t max_freq = 0; 238 + u32 max_freq = 0; 239 + 238 240 cpufreq_for_each_entry(pos, table) 239 241 if (pos->frequency > max_freq) 240 242 max_freq = pos->frequency; ··· 259 259 /* Add in reverse order to get freqs in increasing order */ 260 260 for (i = MAX_CLUSTERS - 1; i >= 0; i--) { 261 261 for (j = 0; freq_table[i][j].frequency != CPUFREQ_TABLE_END; 262 - j++) { 263 - table[k].frequency = VIRT_FREQ(i, 264 - freq_table[i][j].frequency); 265 - k++; 262 + j++, k++) { 263 + table[k].frequency = 264 + VIRT_FREQ(i, freq_table[i][j].frequency); 266 265 } 267 266 } 268 267 ··· 334 335 return 0; 335 336 336 337 dev_err(cpu_dev, "%s: Failed to get clk for cpu: %d, cluster: %d\n", 337 - __func__, cpu_dev->id, cluster); 338 + __func__, cpu_dev->id, cluster); 338 339 ret = PTR_ERR(clk[cluster]); 339 340 dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table[cluster]); 340 341 341 342 out: 342 343 dev_err(cpu_dev, "%s: Failed to get data for cluster: %d\n", __func__, 343 - cluster); 344 + cluster); 344 345 return ret; 345 346 } 346 347 ··· 410 411 cpu_dev = get_cpu_device(policy->cpu); 411 412 if (!cpu_dev) { 412 413 pr_err("%s: failed to get cpu%d device\n", __func__, 413 - policy->cpu); 414 + policy->cpu); 414 415 return -ENODEV; 415 416 } 416 417 ··· 436 437 dev_pm_opp_of_register_em(policy->cpus); 437 438 438 439 if (is_bL_switching_enabled()) 439 - per_cpu(cpu_last_req_freq, policy->cpu) = clk_get_cpu_rate(policy->cpu); 440 + per_cpu(cpu_last_req_freq, policy->cpu) = 441 + clk_get_cpu_rate(policy->cpu); 440 442 441 443 dev_info(cpu_dev, "%s: CPU %d initialized\n", __func__, policy->cpu); 442 444 return 0; ··· 456 456 cpu_dev = get_cpu_device(policy->cpu); 457 457 if (!cpu_dev) { 458 458 pr_err("%s: failed to get cpu%d device\n", __func__, 459 - policy->cpu); 459 + policy->cpu); 460 460 return -ENODEV; 461 461 } 462 462