lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <d883f13621e29d4ee83dc620c5603fb9d1683b0d.1499067362.git.arvind.yadav.cs@gmail.com>
Date:   Mon,  3 Jul 2017 13:16:55 +0530
From:   Arvind Yadav <arvind.yadav.cs@...il.com>
To:     nico@...aro.org, mark.rutland@....com, mingo@...nel.org,
        lorenzo.pieralisi@....com, suzuki.poulose@....com
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH] bus: arm-cci: constify attribute_group structures.

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@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ