Re: [PATCH 10/10] sg: constify sg_proc_leaf_arr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12-04-12 05:35 PM, Jörn Engel wrote:
Signed-off-by: Joern Engel<joern@xxxxxxxxx>

Acked-by: Douglas Gilbert <dgilbert@xxxxxxxxxxxx>

---
  drivers/scsi/sg.c |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 0c646f2..5790358 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -2322,7 +2322,7 @@ struct sg_proc_leaf {
  	const struct file_operations * fops;
  };

-static struct sg_proc_leaf sg_proc_leaf_arr[] = {
+static const struct sg_proc_leaf sg_proc_leaf_arr[] = {
  	{"allow_dio",&adio_fops},
  	{"debug",&debug_fops},
  	{"def_reserved_size",&dressz_fops},
@@ -2342,7 +2342,7 @@ sg_proc_init(void)
  	if (!sg_proc_sgp)
  		return 1;
  	for (k = 0; k<  num_leaves; ++k) {
-		struct sg_proc_leaf *leaf =&sg_proc_leaf_arr[k];
+		const struct sg_proc_leaf *leaf =&sg_proc_leaf_arr[k];
  		umode_t mask = leaf->fops->write ? S_IRUGO | S_IWUSR : S_IRUGO;
  		proc_create(leaf->name, mask, sg_proc_sgp, leaf->fops);
  	}

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux