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

ARM: 7920/1: topology: Staticise non-exported symbols

These symbols are only referenced in this source file so can be made
static, and the efficiency table is constant data so can be declared as
such. This avoids polluting the global namespace and fixes warnings
from sparse.

The function arch_scale_freq_power() is still not prototyped or static,
this is a separate issue as this is overriding a weak symbol from the
scheduler which neglects to provide a prototype.

Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Mark Brown and committed by
Russell King
145bc292 d46cda12

+6 -6
+6 -6
arch/arm/kernel/topology.c
··· 68 68 * Processors that are not defined in the table, 69 69 * use the default SCHED_POWER_SCALE value for cpu_scale. 70 70 */ 71 - struct cpu_efficiency table_efficiency[] = { 71 + static const struct cpu_efficiency table_efficiency[] = { 72 72 {"arm,cortex-a15", 3891}, 73 73 {"arm,cortex-a7", 2048}, 74 74 {NULL, }, 75 75 }; 76 76 77 - unsigned long *__cpu_capacity; 77 + static unsigned long *__cpu_capacity; 78 78 #define cpu_capacity(cpu) __cpu_capacity[cpu] 79 79 80 - unsigned long middle_capacity = 1; 80 + static unsigned long middle_capacity = 1; 81 81 82 82 /* 83 83 * Iterate all CPUs' descriptor in DT and compute the efficiency ··· 89 89 */ 90 90 static void __init parse_dt_topology(void) 91 91 { 92 - struct cpu_efficiency *cpu_eff; 92 + const struct cpu_efficiency *cpu_eff; 93 93 struct device_node *cn = NULL; 94 94 unsigned long min_capacity = (unsigned long)(-1); 95 95 unsigned long max_capacity = 0; ··· 158 158 * boot. The update of all CPUs is in O(n^2) for heteregeneous system but the 159 159 * function returns directly for SMP system. 160 160 */ 161 - void update_cpu_power(unsigned int cpu) 161 + static void update_cpu_power(unsigned int cpu) 162 162 { 163 163 if (!cpu_capacity(cpu)) 164 164 return; ··· 185 185 return &cpu_topology[cpu].core_sibling; 186 186 } 187 187 188 - void update_siblings_masks(unsigned int cpuid) 188 + static void update_siblings_masks(unsigned int cpuid) 189 189 { 190 190 struct cputopo_arm *cpu_topo, *cpuid_topo = &cpu_topology[cpuid]; 191 191 int cpu;