summaryrefslogtreecommitdiff
path: root/arch/powerpc/perf/generic-compat-pmu.c
diff options
context:
space:
mode:
authorRohan McLure <rmclure@linux.ibm.com>2022-03-08 02:14:14 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2022-03-08 14:15:32 +0300
commit6b3a3e12f8e6eea47428bb39aaf58832b50bb379 (patch)
tree0f38c62d684a4f16fa4cfa0f70dedab6244b2785 /arch/powerpc/perf/generic-compat-pmu.c
parent5986f6b6575ac830ede9648cfb64353c58067a9f (diff)
downloadlinux-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/generic-compat-pmu.c')
-rw-r--r--arch/powerpc/perf/generic-compat-pmu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/perf/generic-compat-pmu.c b/arch/powerpc/perf/generic-compat-pmu.c
index b6e25f75109d..f3db88aee4dd 100644
--- a/arch/powerpc/perf/generic-compat-pmu.c
+++ b/arch/powerpc/perf/generic-compat-pmu.c
@@ -130,7 +130,7 @@ static struct attribute *generic_compat_events_attr[] = {
NULL
};
-static struct attribute_group generic_compat_pmu_events_group = {
+static const struct attribute_group generic_compat_pmu_events_group = {
.name = "events",
.attrs = generic_compat_events_attr,
};
@@ -146,7 +146,7 @@ static struct attribute *generic_compat_pmu_format_attr[] = {
NULL,
};
-static struct attribute_group generic_compat_pmu_format_group = {
+static const struct attribute_group generic_compat_pmu_format_group = {
.name = "format",
.attrs = generic_compat_pmu_format_attr,
};