perf: hisi: Constify static struct attribute_group
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Sun, 17 Jan 2021 21:28:46 +0000 (22:28 +0100)
committerWill Deacon <will@kernel.org>
Wed, 20 Jan 2021 17:51:22 +0000 (17:51 +0000)
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-4-rikard.falkeborn@gmail.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c
drivers/perf/hisilicon/hisi_uncore_hha_pmu.c
drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c

index 5ac6c91..ac1a8c1 100644 (file)
@@ -319,7 +319,7 @@ static struct attribute *hisi_ddrc_pmu_identifier_attrs[] = {
        NULL
 };
 
-static struct attribute_group hisi_ddrc_pmu_identifier_group = {
+static const struct attribute_group hisi_ddrc_pmu_identifier_group = {
        .attrs = hisi_ddrc_pmu_identifier_attrs,
 };
 
index 41b2dce..3402f1a 100644 (file)
@@ -331,7 +331,7 @@ static struct attribute *hisi_hha_pmu_identifier_attrs[] = {
        NULL
 };
 
-static struct attribute_group hisi_hha_pmu_identifier_group = {
+static const struct attribute_group hisi_hha_pmu_identifier_group = {
        .attrs = hisi_hha_pmu_identifier_attrs,
 };
 
index 705501d..7d79243 100644 (file)
@@ -321,7 +321,7 @@ static struct attribute *hisi_l3c_pmu_identifier_attrs[] = {
        NULL
 };
 
-static struct attribute_group hisi_l3c_pmu_identifier_group = {
+static const struct attribute_group hisi_l3c_pmu_identifier_group = {
        .attrs = hisi_l3c_pmu_identifier_attrs,
 };