[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1501597274-5544-1-git-send-email-bhumirks@gmail.com>
Date: Tue, 1 Aug 2017 19:51:14 +0530
From: Bhumika Goyal <bhumirks@...il.com>
To: julia.lawall@...6.fr, jejb@...ux.vnet.ibm.com,
martin.petersen@...cle.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Bhumika Goyal <bhumirks@...il.com>
Subject: [PATCH] arcmsr: add const to bin_attribute structures
Add const to bin_attribute structures as they are only passed to the
functions system_{remove/create}_bin_file. The arguments passed are of
type const, so declare the structures to be const.
Done using Coccinelle.
Signed-off-by: Bhumika Goyal <bhumirks@...il.com>
---
drivers/scsi/arcmsr/arcmsr_attr.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/arcmsr/arcmsr_attr.c b/drivers/scsi/arcmsr/arcmsr_attr.c
index 9c86481..259d9c2 100644
--- a/drivers/scsi/arcmsr/arcmsr_attr.c
+++ b/drivers/scsi/arcmsr/arcmsr_attr.c
@@ -190,7 +190,7 @@ static ssize_t arcmsr_sysfs_iop_message_clear(struct file *filp,
return 1;
}
-static struct bin_attribute arcmsr_sysfs_message_read_attr = {
+static const struct bin_attribute arcmsr_sysfs_message_read_attr = {
.attr = {
.name = "mu_read",
.mode = S_IRUSR ,
@@ -199,7 +199,7 @@ static ssize_t arcmsr_sysfs_iop_message_clear(struct file *filp,
.read = arcmsr_sysfs_iop_message_read,
};
-static struct bin_attribute arcmsr_sysfs_message_write_attr = {
+static const struct bin_attribute arcmsr_sysfs_message_write_attr = {
.attr = {
.name = "mu_write",
.mode = S_IWUSR,
@@ -208,7 +208,7 @@ static ssize_t arcmsr_sysfs_iop_message_clear(struct file *filp,
.write = arcmsr_sysfs_iop_message_write,
};
-static struct bin_attribute arcmsr_sysfs_message_clear_attr = {
+static const struct bin_attribute arcmsr_sysfs_message_clear_attr = {
.attr = {
.name = "mu_clear",
.mode = S_IWUSR,
--
1.9.1
Powered by blists - more mailing lists