public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] bus: arm-cci: constify attribute_group structures.
@ 2017-07-03  7:46 Arvind Yadav
  2017-07-04 11:35 ` Mark Rutland
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-07-03  7:46 UTC (permalink / raw)
  To: nico, mark.rutland, mingo, lorenzo.pieralisi, suzuki.poulose; +Cc: linux-kernel

attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by <linux/sysfs.h> work with const
attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/bus/arm-cci.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
index c49da15..64c75d2 100644
--- a/drivers/bus/arm-cci.c
+++ b/drivers/bus/arm-cci.c
@@ -1445,16 +1445,16 @@ static ssize_t pmu_cpumask_attr_show(struct device *dev,
 	NULL,
 };
 
-static struct attribute_group pmu_attr_group = {
+static const struct attribute_group pmu_attr_group = {
 	.attrs = pmu_attrs,
 };
 
-static struct attribute_group pmu_format_attr_group = {
+static const struct attribute_group pmu_format_attr_group = {
 	.name = "format",
 	.attrs = NULL,		/* Filled in cci_pmu_init_attrs */
 };
 
-static struct attribute_group pmu_event_attr_group = {
+static const struct attribute_group pmu_event_attr_group = {
 	.name = "events",
 	.attrs = NULL,		/* Filled in cci_pmu_init_attrs */
 };
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-07-16 10:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-03  7:46 [PATCH] bus: arm-cci: constify attribute_group structures Arvind Yadav
2017-07-04 11:35 ` Mark Rutland
2017-07-05 16:03 ` Suzuki K Poulose
2017-07-06  4:53   ` Arvind Yadav
2017-07-06  8:41     ` Suzuki K Poulose
2017-07-16  9:29 ` kbuild test robot
2017-07-16 10:32   ` arvind

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox