Skip to content

Commit 59d697a

Browse files
rikardfalkebornwilldeacon
authored andcommitted
perf/hisi: Constify static attribute_group structs
These are only put in an array of pointers to const attribute_group structs. Make them const like the other static attribute_group structs 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/20210605221514.73449-1-rikard.falkeborn@gmail.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent 5ca5440 commit 59d697a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/perf/hisilicon/hisi_uncore_pa_pmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ static struct attribute *hisi_pa_pmu_identifier_attrs[] = {
333333
NULL
334334
};
335335

336-
static struct attribute_group hisi_pa_pmu_identifier_group = {
336+
static const struct attribute_group hisi_pa_pmu_identifier_group = {
337337
.attrs = hisi_pa_pmu_identifier_attrs,
338338
};
339339

drivers/perf/hisilicon/hisi_uncore_sllc_pmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ static struct attribute *hisi_sllc_pmu_identifier_attrs[] = {
366366
NULL
367367
};
368368

369-
static struct attribute_group hisi_sllc_pmu_identifier_group = {
369+
static const struct attribute_group hisi_sllc_pmu_identifier_group = {
370370
.attrs = hisi_sllc_pmu_identifier_attrs,
371371
};
372372

0 commit comments

Comments
 (0)