diff options
author | Rohan McLure <rmclure@linux.ibm.com> | 2022-03-08 02:14:14 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-03-08 14:15:32 +0300 |
commit | 6b3a3e12f8e6eea47428bb39aaf58832b50bb379 (patch) | |
tree | 0f38c62d684a4f16fa4cfa0f70dedab6244b2785 /arch/powerpc/perf/isa207-common.c | |
parent | 5986f6b6575ac830ede9648cfb64353c58067a9f (diff) | |
download | linux-6b3a3e12f8e6eea47428bb39aaf58832b50bb379.tar.xz |
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
Diffstat (limited to 'arch/powerpc/perf/isa207-common.c')
-rw-r--r-- | arch/powerpc/perf/isa207-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/perf/isa207-common.c b/arch/powerpc/perf/isa207-common.c index 4037ea652522..a74d382ecbb7 100644 --- a/arch/powerpc/perf/isa207-common.c +++ b/arch/powerpc/perf/isa207-common.c @@ -37,7 +37,7 @@ static struct attribute *isa207_pmu_format_attr[] = { NULL, }; -struct attribute_group isa207_pmu_format_group = { +const struct attribute_group isa207_pmu_format_group = { .name = "format", .attrs = isa207_pmu_format_attr, }; |