powerpc: declare unmodified attribute_group usages const
authorRohan McLure <rmclure@linux.ibm.com>
Mon, 7 Mar 2022 23:14:14 +0000 (10:14 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 8 Mar 2022 11:15:32 +0000 (22:15 +1100)
commit6b3a3e12f8e6eea47428bb39aaf58832b50bb379
tree0f38c62d684a4f16fa4cfa0f70dedab6244b2785
parent5986f6b6575ac830ede9648cfb64353c58067a9f
powerpc: declare unmodified attribute_group usages const

Inspired by (bd75b4ef4977: Constify static attribute_group structs),
accepted by linux-next, reported:
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20220210202805.7750-4-rikard.falkeborn@gmail.com/

Nearly all singletons of type struct attribute_group are never modified,
and so are candidates for being const. Declare them as const.

Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220307231414.86560-1-rmclure@linux.ibm.com
17 files changed:
arch/powerpc/include/asm/spu.h
arch/powerpc/perf/generic-compat-pmu.c
arch/powerpc/perf/hv-24x7.c
arch/powerpc/perf/hv-gpci.c
arch/powerpc/perf/imc-pmu.c
arch/powerpc/perf/isa207-common.c
arch/powerpc/perf/power10-pmu.c
arch/powerpc/perf/power7-pmu.c
arch/powerpc/perf/power8-pmu.c
arch/powerpc/perf/power9-pmu.c
arch/powerpc/platforms/cell/cbe_thermal.c
arch/powerpc/platforms/cell/spu_base.c
arch/powerpc/platforms/powernv/opal-core.c
arch/powerpc/platforms/powernv/opal-dump.c
arch/powerpc/platforms/powernv/opal-flash.c
arch/powerpc/platforms/pseries/papr_scm.c
arch/powerpc/platforms/pseries/power.c