diff options
author | Yury Norov <ynorov@caviumnetworks.com> | 2017-11-29 09:03:03 -0500 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-12-01 08:05:08 -0500 |
commit | 770ba06084f7aeadea120922c775d574f3128ba3 (patch) | |
tree | dd1da4062f384b0a5c1afcb1cfa0d95cf1637734 | |
parent | f8ada189550984ee21f27be736042b74a7da1d68 (diff) |
arm64: cpu_ops: Add missing 'const' qualifiers
Building the kernel with an LTO-enabled GCC spits out the following "const"
warning for the cpu_ops code:
mm/percpu.c:2168:20: error: pcpu_fc_names causes a section type conflict
with dt_supported_cpu_ops
const char * const pcpu_fc_names[PCPU_FC_NR] __initconst = {
^
arch/arm64/kernel/cpu_ops.c:34:37: note: ‘dt_supported_cpu_ops’ was declared here
static const struct cpu_operations *dt_supported_cpu_ops[] __initconst = {
Fix it by adding missed const qualifiers.
Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | arch/arm64/kernel/cpu_ops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm64/kernel/cpu_ops.c b/arch/arm64/kernel/cpu_ops.c index d16978213c5b..ea001241bdd4 100644 --- a/arch/arm64/kernel/cpu_ops.c +++ b/arch/arm64/kernel/cpu_ops.c | |||
@@ -31,13 +31,13 @@ extern const struct cpu_operations cpu_psci_ops; | |||
31 | 31 | ||
32 | const struct cpu_operations *cpu_ops[NR_CPUS] __ro_after_init; | 32 | const struct cpu_operations *cpu_ops[NR_CPUS] __ro_after_init; |
33 | 33 | ||
34 | static const struct cpu_operations *dt_supported_cpu_ops[] __initconst = { | 34 | static const struct cpu_operations *const dt_supported_cpu_ops[] __initconst = { |
35 | &smp_spin_table_ops, | 35 | &smp_spin_table_ops, |
36 | &cpu_psci_ops, | 36 | &cpu_psci_ops, |
37 | NULL, | 37 | NULL, |
38 | }; | 38 | }; |
39 | 39 | ||
40 | static const struct cpu_operations *acpi_supported_cpu_ops[] __initconst = { | 40 | static const struct cpu_operations *const acpi_supported_cpu_ops[] __initconst = { |
41 | #ifdef CONFIG_ARM64_ACPI_PARKING_PROTOCOL | 41 | #ifdef CONFIG_ARM64_ACPI_PARKING_PROTOCOL |
42 | &acpi_parking_protocol_ops, | 42 | &acpi_parking_protocol_ops, |
43 | #endif | 43 | #endif |
@@ -47,7 +47,7 @@ static const struct cpu_operations *acpi_supported_cpu_ops[] __initconst = { | |||
47 | 47 | ||
48 | static const struct cpu_operations * __init cpu_get_ops(const char *name) | 48 | static const struct cpu_operations * __init cpu_get_ops(const char *name) |
49 | { | 49 | { |
50 | const struct cpu_operations **ops; | 50 | const struct cpu_operations *const *ops; |
51 | 51 | ||
52 | ops = acpi_disabled ? dt_supported_cpu_ops : acpi_supported_cpu_ops; | 52 | ops = acpi_disabled ? dt_supported_cpu_ops : acpi_supported_cpu_ops; |
53 | 53 | ||