summaryrefslogtreecommitdiff
path: root/drivers/perf/arm_smmuv3_pmu.c
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2021-01-18 00:28:47 +0300
committerWill Deacon <will@kernel.org>2021-01-20 20:51:23 +0300
commitf0c140481d1b807217cacdcf11d24cfa407a7a53 (patch)
treeb73fe50bd0c88552f325139a3974dff93e7fe6dc /drivers/perf/arm_smmuv3_pmu.c
parentc2c4d5c051b23dd79ff82d6232347245e11d7c9c (diff)
downloadlinux-f0c140481d1b807217cacdcf11d24cfa407a7a53.tar.xz
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_smmuv3_pmu.c')
-rw-r--r--drivers/perf/arm_smmuv3_pmu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c
index 74474bb322c3..8ff7a67f691c 100644
--- a/drivers/perf/arm_smmuv3_pmu.c
+++ b/drivers/perf/arm_smmuv3_pmu.c
@@ -493,7 +493,7 @@ static struct attribute *smmu_pmu_cpumask_attrs[] = {
NULL
};
-static struct attribute_group smmu_pmu_cpumask_group = {
+static const struct attribute_group smmu_pmu_cpumask_group = {
.attrs = smmu_pmu_cpumask_attrs,
};
@@ -548,7 +548,7 @@ static umode_t smmu_pmu_event_is_visible(struct kobject *kobj,
return 0;
}
-static struct attribute_group smmu_pmu_events_group = {
+static const struct attribute_group smmu_pmu_events_group = {
.name = "events",
.attrs = smmu_pmu_events,
.is_visible = smmu_pmu_event_is_visible,
@@ -583,7 +583,7 @@ static struct attribute *smmu_pmu_identifier_attrs[] = {
NULL
};
-static struct attribute_group smmu_pmu_identifier_group = {
+static const struct attribute_group smmu_pmu_identifier_group = {
.attrs = smmu_pmu_identifier_attrs,
.is_visible = smmu_pmu_identifier_attr_visible,
};
@@ -602,7 +602,7 @@ static struct attribute *smmu_pmu_formats[] = {
NULL
};
-static struct attribute_group smmu_pmu_format_group = {
+static const struct attribute_group smmu_pmu_format_group = {
.name = "format",
.attrs = smmu_pmu_formats,
};