perf/hisi: Constify static attribute_group structs
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Sat, 5 Jun 2021 22:15:14 +0000 (00:15 +0200)
committerWill Deacon <will@kernel.org>
Tue, 8 Jun 2021 11:49:54 +0000 (12:49 +0100)
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>
drivers/perf/hisilicon/hisi_uncore_pa_pmu.c
drivers/perf/hisilicon/hisi_uncore_sllc_pmu.c

index e1f71ea..83264ec 100644 (file)
@@ -333,7 +333,7 @@ static struct attribute *hisi_pa_pmu_identifier_attrs[] = {
        NULL
 };
 
-static struct attribute_group hisi_pa_pmu_identifier_group = {
+static const struct attribute_group hisi_pa_pmu_identifier_group = {
        .attrs = hisi_pa_pmu_identifier_attrs,
 };
 
index 08e028d..6aedc30 100644 (file)
@@ -366,7 +366,7 @@ static struct attribute *hisi_sllc_pmu_identifier_attrs[] = {
        NULL
 };
 
-static struct attribute_group hisi_sllc_pmu_identifier_group = {
+static const struct attribute_group hisi_sllc_pmu_identifier_group = {
        .attrs = hisi_sllc_pmu_identifier_attrs,
 };