* [PATCH] arcmsr: add const to bin_attribute structures
@ 2017-08-01 14:21 Bhumika Goyal
2017-08-10 9:25 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Bhumika Goyal @ 2017-08-01 14:21 UTC (permalink / raw)
To: julia.lawall, jejb, martin.petersen, linux-scsi, linux-kernel
Cc: Bhumika Goyal
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@gmail.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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arcmsr: add const to bin_attribute structures
2017-08-01 14:21 [PATCH] arcmsr: add const to bin_attribute structures Bhumika Goyal
@ 2017-08-10 9:25 ` Christoph Hellwig
2017-08-10 23:41 ` Martin K. Petersen
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2017-08-10 9:25 UTC (permalink / raw)
To: Bhumika Goyal
Cc: julia.lawall, jejb, martin.petersen, linux-scsi, linux-kernel
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arcmsr: add const to bin_attribute structures
2017-08-10 9:25 ` Christoph Hellwig
@ 2017-08-10 23:41 ` Martin K. Petersen
0 siblings, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2017-08-10 23:41 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Bhumika Goyal, julia.lawall, jejb, martin.petersen, linux-scsi,
linux-kernel
Christoph,
> Looks good,
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
Applied to 4.14/scsi-queue. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-08-10 23:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-01 14:21 [PATCH] arcmsr: add const to bin_attribute structures Bhumika Goyal
2017-08-10 9:25 ` Christoph Hellwig
2017-08-10 23:41 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).