arm64: cpu_ops: Add missing 'const' qualifiers
authorYury Norov <ynorov@caviumnetworks.com>
Wed, 29 Nov 2017 14:03:03 +0000 (17:03 +0300)
committerWill Deacon <will.deacon@arm.com>
Fri, 1 Dec 2017 13:05:08 +0000 (13:05 +0000)
commit770ba06084f7aeadea120922c775d574f3128ba3
treedd1da4062f384b0a5c1afcb1cfa0d95cf1637734
parentf8ada189550984ee21f27be736042b74a7da1d68
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>
arch/arm64/kernel/cpu_ops.c