aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:34 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:45 -0500
commit00977a59b951207d38380c75f03a36829950265c (patch)
tree26933feafebffca95df02c19df03f5e56aada47e /drivers/scsi
parentd54b1fdb1d9f82e375a299e22bd366aad52d4c34 (diff)
[PATCH] mark struct file_operations const 6
Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/3w-9xxx.c2
-rw-r--r--drivers/scsi/3w-xxxx.c2
-rw-r--r--drivers/scsi/aacraid/linit.c2
-rw-r--r--drivers/scsi/ch.c2
-rw-r--r--drivers/scsi/dpt_i2o.c2
-rw-r--r--drivers/scsi/gdth.c2
-rw-r--r--drivers/scsi/megaraid.c2
-rw-r--r--drivers/scsi/megaraid/megaraid_mm.c2
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.c2
-rw-r--r--drivers/scsi/osst.c2
-rw-r--r--drivers/scsi/scsi_proc.c2
-rw-r--r--drivers/scsi/scsi_tgt_if.c2
-rw-r--r--drivers/scsi/st.c2
13 files changed, 13 insertions, 13 deletions
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index b091a0fc4eb0..eb766c3af1c8 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -197,7 +197,7 @@ static struct class_device_attribute *twa_host_attrs[] = {
197}; 197};
198 198
199/* File operations struct for character device */ 199/* File operations struct for character device */
200static struct file_operations twa_fops = { 200static const struct file_operations twa_fops = {
201 .owner = THIS_MODULE, 201 .owner = THIS_MODULE,
202 .ioctl = twa_chrdev_ioctl, 202 .ioctl = twa_chrdev_ioctl,
203 .open = twa_chrdev_open, 203 .open = twa_chrdev_open,
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
index e1b44d6c0c32..bf5d63e1beee 100644
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.c
@@ -1040,7 +1040,7 @@ static int tw_chrdev_open(struct inode *inode, struct file *file)
1040} /* End tw_chrdev_open() */ 1040} /* End tw_chrdev_open() */
1041 1041
1042/* File operations struct for character device */ 1042/* File operations struct for character device */
1043static struct file_operations tw_fops = { 1043static const struct file_operations tw_fops = {
1044 .owner = THIS_MODULE, 1044 .owner = THIS_MODULE,
1045 .ioctl = tw_chrdev_ioctl, 1045 .ioctl = tw_chrdev_ioctl,
1046 .open = tw_chrdev_open, 1046 .open = tw_chrdev_open,
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index a9734e08fe28..0f948c2fb609 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -774,7 +774,7 @@ static struct class_device_attribute *aac_attrs[] = {
774}; 774};
775 775
776 776
777static struct file_operations aac_cfg_fops = { 777static const struct file_operations aac_cfg_fops = {
778 .owner = THIS_MODULE, 778 .owner = THIS_MODULE,
779 .ioctl = aac_cfg_ioctl, 779 .ioctl = aac_cfg_ioctl,
780#ifdef CONFIG_COMPAT 780#ifdef CONFIG_COMPAT
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index f6caa4307768..d02759f13469 100644
--- a/drivers/scsi/ch.c
+++ b/drivers/scsi/ch.c
@@ -129,7 +129,7 @@ static struct scsi_driver ch_template =
129 }, 129 },
130}; 130};
131 131
132static struct file_operations changer_fops = 132static const struct file_operations changer_fops =
133{ 133{
134 .owner = THIS_MODULE, 134 .owner = THIS_MODULE,
135 .open = ch_open, 135 .open = ch_open,
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index 365db537a28d..cd36e81b2d93 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -116,7 +116,7 @@ static int sys_tbl_len = 0;
116static adpt_hba* hba_chain = NULL; 116static adpt_hba* hba_chain = NULL;
117static int hba_count = 0; 117static int hba_count = 0;
118 118
119static struct file_operations adpt_fops = { 119static const struct file_operations adpt_fops = {
120 .ioctl = adpt_ioctl, 120 .ioctl = adpt_ioctl,
121 .open = adpt_open, 121 .open = adpt_open,
122 .release = adpt_close 122 .release = adpt_close
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index 4c698a71f66f..a1992928e671 100644
--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -687,7 +687,7 @@ MODULE_AUTHOR("Achim Leubner");
687MODULE_LICENSE("GPL"); 687MODULE_LICENSE("GPL");
688 688
689/* ioctl interface */ 689/* ioctl interface */
690static struct file_operations gdth_fops = { 690static const struct file_operations gdth_fops = {
691 .ioctl = gdth_ioctl, 691 .ioctl = gdth_ioctl,
692 .open = gdth_open, 692 .open = gdth_open,
693 .release = gdth_close, 693 .release = gdth_close,
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 77d9d3804ccf..808a1b8c4043 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -92,7 +92,7 @@ static struct mega_hbas mega_hbas[MAX_CONTROLLERS];
92/* 92/*
93 * The File Operations structure for the serial/ioctl interface of the driver 93 * The File Operations structure for the serial/ioctl interface of the driver
94 */ 94 */
95static struct file_operations megadev_fops = { 95static const struct file_operations megadev_fops = {
96 .owner = THIS_MODULE, 96 .owner = THIS_MODULE,
97 .ioctl = megadev_ioctl, 97 .ioctl = megadev_ioctl,
98 .open = megadev_open, 98 .open = megadev_open,
diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c
index c1ff20c4747d..f33a678f0897 100644
--- a/drivers/scsi/megaraid/megaraid_mm.c
+++ b/drivers/scsi/megaraid/megaraid_mm.c
@@ -67,7 +67,7 @@ static struct list_head adapters_list_g;
67 67
68static wait_queue_head_t wait_q; 68static wait_queue_head_t wait_q;
69 69
70static struct file_operations lsi_fops = { 70static const struct file_operations lsi_fops = {
71 .open = mraid_mm_open, 71 .open = mraid_mm_open,
72 .ioctl = mraid_mm_ioctl, 72 .ioctl = mraid_mm_ioctl,
73#ifdef CONFIG_COMPAT 73#ifdef CONFIG_COMPAT
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
index b5bdd0d7a8bf..15e24fcc84f3 100644
--- a/drivers/scsi/megaraid/megaraid_sas.c
+++ b/drivers/scsi/megaraid/megaraid_sas.c
@@ -2913,7 +2913,7 @@ megasas_mgmt_compat_ioctl(struct file *file, unsigned int cmd,
2913/* 2913/*
2914 * File operations structure for management interface 2914 * File operations structure for management interface
2915 */ 2915 */
2916static struct file_operations megasas_mgmt_fops = { 2916static const struct file_operations megasas_mgmt_fops = {
2917 .owner = THIS_MODULE, 2917 .owner = THIS_MODULE,
2918 .open = megasas_mgmt_open, 2918 .open = megasas_mgmt_open,
2919 .release = megasas_mgmt_release, 2919 .release = megasas_mgmt_release,
diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c
index bd6bbf61adb8..9668b73872c7 100644
--- a/drivers/scsi/osst.c
+++ b/drivers/scsi/osst.c
@@ -5522,7 +5522,7 @@ __setup("osst=", osst_setup);
5522 5522
5523#endif 5523#endif
5524 5524
5525static struct file_operations osst_fops = { 5525static const struct file_operations osst_fops = {
5526 .owner = THIS_MODULE, 5526 .owner = THIS_MODULE,
5527 .read = osst_read, 5527 .read = osst_read,
5528 .write = osst_write, 5528 .write = osst_write,
diff --git a/drivers/scsi/scsi_proc.c b/drivers/scsi/scsi_proc.c
index 524a5f7a5193..69d6e9b198c4 100644
--- a/drivers/scsi/scsi_proc.c
+++ b/drivers/scsi/scsi_proc.c
@@ -308,7 +308,7 @@ static int proc_scsi_open(struct inode *inode, struct file *file)
308 return single_open(file, proc_scsi_show, NULL); 308 return single_open(file, proc_scsi_show, NULL);
309} 309}
310 310
311static struct file_operations proc_scsi_operations = { 311static const struct file_operations proc_scsi_operations = {
312 .open = proc_scsi_open, 312 .open = proc_scsi_open,
313 .read = seq_read, 313 .read = seq_read,
314 .write = proc_scsi_write, 314 .write = proc_scsi_write,
diff --git a/drivers/scsi/scsi_tgt_if.c b/drivers/scsi/scsi_tgt_if.c
index 37bbfbdb870f..f2344ab8deff 100644
--- a/drivers/scsi/scsi_tgt_if.c
+++ b/drivers/scsi/scsi_tgt_if.c
@@ -280,7 +280,7 @@ static int tgt_open(struct inode *inode, struct file *file)
280 return 0; 280 return 0;
281} 281}
282 282
283static struct file_operations tgt_fops = { 283static const struct file_operations tgt_fops = {
284 .owner = THIS_MODULE, 284 .owner = THIS_MODULE,
285 .open = tgt_open, 285 .open = tgt_open,
286 .poll = tgt_poll, 286 .poll = tgt_poll,
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 16e279be4a3e..3d2e02381e92 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -3864,7 +3864,7 @@ __setup("st=", st_setup);
3864 3864
3865#endif 3865#endif
3866 3866
3867static struct file_operations st_fops = 3867static const struct file_operations st_fops =
3868{ 3868{
3869 .owner = THIS_MODULE, 3869 .owner = THIS_MODULE,
3870 .read = st_read, 3870 .read = st_read,