From: Rikard Falkeborn Date: Sun, 17 Jan 2021 21:28:45 +0000 (+0100) Subject: perf/imx_ddr: Constify static struct attribute_group X-Git-Tag: accepted/tizen/unified/20230118.172025~7721^2~18^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3cb7d2da183fec42974fa3fa795cc33d1e81322d;p=platform%2Fkernel%2Flinux-rpi.git perf/imx_ddr: 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 Link: https://lore.kernel.org/r/20210117212847.21319-3-rikard.falkeborn@gmail.com Signed-off-by: Will Deacon --- diff --git a/drivers/perf/fsl_imx8_ddr_perf.c b/drivers/perf/fsl_imx8_ddr_perf.c index a11bfd8..be1f26b 100644 --- a/drivers/perf/fsl_imx8_ddr_perf.c +++ b/drivers/perf/fsl_imx8_ddr_perf.c @@ -133,7 +133,7 @@ static struct attribute *ddr_perf_identifier_attrs[] = { NULL, }; -static struct attribute_group ddr_perf_identifier_attr_group = { +static const struct attribute_group ddr_perf_identifier_attr_group = { .attrs = ddr_perf_identifier_attrs, .is_visible = ddr_perf_identifier_attr_visible, }; @@ -188,7 +188,7 @@ static struct attribute *ddr_perf_filter_cap_attr[] = { NULL, }; -static struct attribute_group ddr_perf_filter_cap_attr_group = { +static const struct attribute_group ddr_perf_filter_cap_attr_group = { .name = "caps", .attrs = ddr_perf_filter_cap_attr, }; @@ -209,7 +209,7 @@ static struct attribute *ddr_perf_cpumask_attrs[] = { NULL, }; -static struct attribute_group ddr_perf_cpumask_attr_group = { +static const struct attribute_group ddr_perf_cpumask_attr_group = { .attrs = ddr_perf_cpumask_attrs, }; @@ -265,7 +265,7 @@ static struct attribute *ddr_perf_events_attrs[] = { NULL, }; -static struct attribute_group ddr_perf_events_attr_group = { +static const struct attribute_group ddr_perf_events_attr_group = { .name = "events", .attrs = ddr_perf_events_attrs, }; @@ -281,7 +281,7 @@ static struct attribute *ddr_perf_format_attrs[] = { NULL, }; -static struct attribute_group ddr_perf_format_attr_group = { +static const struct attribute_group ddr_perf_format_attr_group = { .name = "format", .attrs = ddr_perf_format_attrs, };