summaryrefslogtreecommitdiffstats
path: root/drivers/perf/arm_spe_pmu.c
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2021-01-17 22:28:47 +0100
committerWill Deacon <will@kernel.org>2021-01-20 17:51:23 +0000
commitf0c140481d1b807217cacdcf11d24cfa407a7a53 (patch)
treeb73fe50bd0c88552f325139a3974dff93e7fe6dc /drivers/perf/arm_spe_pmu.c
parentc2c4d5c051b23dd79ff82d6232347245e11d7c9c (diff)
downloadlinux-f0c140481d1b807217cacdcf11d24cfa407a7a53.tar.gz
linux-f0c140481d1b807217cacdcf11d24cfa407a7a53.tar.bz2
linux-f0c140481d1b807217cacdcf11d24cfa407a7a53.zip
perf: Constify static struct attribute_group
The only usage is to put their addresses in an array of pointers to const struct attribute group. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20210117212847.21319-5-rikard.falkeborn@gmail.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/perf/arm_spe_pmu.c')
-rw-r--r--drivers/perf/arm_spe_pmu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/perf/arm_spe_pmu.c b/drivers/perf/arm_spe_pmu.c
index bce9aff9f546..d3929ccebfd2 100644
--- a/drivers/perf/arm_spe_pmu.c
+++ b/drivers/perf/arm_spe_pmu.c
@@ -146,7 +146,7 @@ static struct attribute *arm_spe_pmu_cap_attr[] = {
NULL,
};
-static struct attribute_group arm_spe_pmu_cap_group = {
+static const struct attribute_group arm_spe_pmu_cap_group = {
.name = "caps",
.attrs = arm_spe_pmu_cap_attr,
};
@@ -227,7 +227,7 @@ static struct attribute *arm_spe_pmu_formats_attr[] = {
NULL,
};
-static struct attribute_group arm_spe_pmu_format_group = {
+static const struct attribute_group arm_spe_pmu_format_group = {
.name = "format",
.attrs = arm_spe_pmu_formats_attr,
};
@@ -247,7 +247,7 @@ static struct attribute *arm_spe_pmu_attrs[] = {
NULL,
};
-static struct attribute_group arm_spe_pmu_group = {
+static const struct attribute_group arm_spe_pmu_group = {
.attrs = arm_spe_pmu_attrs,
};