Commit 30b34c48 authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Will Deacon

perf: qcom: 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: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20210117212847.21319-2-rikard.falkeborn@gmail.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
parent 4a669e24
...@@ -649,7 +649,7 @@ static struct attribute *l2_cache_pmu_cpumask_attrs[] = { ...@@ -649,7 +649,7 @@ static struct attribute *l2_cache_pmu_cpumask_attrs[] = {
NULL, NULL,
}; };
static struct attribute_group l2_cache_pmu_cpumask_group = { static const struct attribute_group l2_cache_pmu_cpumask_group = {
.attrs = l2_cache_pmu_cpumask_attrs, .attrs = l2_cache_pmu_cpumask_attrs,
}; };
...@@ -665,7 +665,7 @@ static struct attribute *l2_cache_pmu_formats[] = { ...@@ -665,7 +665,7 @@ static struct attribute *l2_cache_pmu_formats[] = {
NULL, NULL,
}; };
static struct attribute_group l2_cache_pmu_format_group = { static const struct attribute_group l2_cache_pmu_format_group = {
.name = "format", .name = "format",
.attrs = l2_cache_pmu_formats, .attrs = l2_cache_pmu_formats,
}; };
...@@ -700,7 +700,7 @@ static struct attribute *l2_cache_pmu_events[] = { ...@@ -700,7 +700,7 @@ static struct attribute *l2_cache_pmu_events[] = {
NULL NULL
}; };
static struct attribute_group l2_cache_pmu_events_group = { static const struct attribute_group l2_cache_pmu_events_group = {
.name = "events", .name = "events",
.attrs = l2_cache_pmu_events, .attrs = l2_cache_pmu_events,
}; };
......
...@@ -630,7 +630,7 @@ static struct attribute *qcom_l3_cache_pmu_formats[] = { ...@@ -630,7 +630,7 @@ static struct attribute *qcom_l3_cache_pmu_formats[] = {
NULL, NULL,
}; };
static struct attribute_group qcom_l3_cache_pmu_format_group = { static const struct attribute_group qcom_l3_cache_pmu_format_group = {
.name = "format", .name = "format",
.attrs = qcom_l3_cache_pmu_formats, .attrs = qcom_l3_cache_pmu_formats,
}; };
...@@ -663,7 +663,7 @@ static struct attribute *qcom_l3_cache_pmu_events[] = { ...@@ -663,7 +663,7 @@ static struct attribute *qcom_l3_cache_pmu_events[] = {
NULL NULL
}; };
static struct attribute_group qcom_l3_cache_pmu_events_group = { static const struct attribute_group qcom_l3_cache_pmu_events_group = {
.name = "events", .name = "events",
.attrs = qcom_l3_cache_pmu_events, .attrs = qcom_l3_cache_pmu_events,
}; };
...@@ -685,7 +685,7 @@ static struct attribute *qcom_l3_cache_pmu_cpumask_attrs[] = { ...@@ -685,7 +685,7 @@ static struct attribute *qcom_l3_cache_pmu_cpumask_attrs[] = {
NULL, NULL,
}; };
static struct attribute_group qcom_l3_cache_pmu_cpumask_attr_group = { static const struct attribute_group qcom_l3_cache_pmu_cpumask_attr_group = {
.attrs = qcom_l3_cache_pmu_cpumask_attrs, .attrs = qcom_l3_cache_pmu_cpumask_attrs,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment