aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2005-11-28 10:22:25 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2005-12-13 20:11:01 -0500
commit0ad78200baf1f85a21e6b26c225717ad80980d8f (patch)
tree7f5ffcd60c5bb1dd9a2ef943b2b0950bd5ac5b55 /drivers/scsi
parentce155ccecd4094e7b5e68058d26db691713240fc (diff)
[SCSI] Mark some core scsi data structures const
patch below marks a few scsi core datastructures as const, so that they end up in the .rodata section and don't cacheline share with things that get dirtied Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ch.c4
-rw-r--r--drivers/scsi/constants.c16
-rw-r--r--drivers/scsi/raid_class.c2
-rw-r--r--drivers/scsi/scsi_scan.c2
-rw-r--r--drivers/scsi/scsi_sysfs.c4
-rw-r--r--drivers/scsi/scsi_transport_fc.c8
-rw-r--r--drivers/scsi/sr.c2
-rw-r--r--drivers/scsi/st.c4
8 files changed, 21 insertions, 21 deletions
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index ccbbae2bf478..0920220f3313 100644
--- a/drivers/scsi/ch.c
+++ b/drivers/scsi/ch.c
@@ -75,7 +75,7 @@ static int vendor_counts[CH_TYPES-4];
75module_param_array(vendor_firsts, int, NULL, 0444); 75module_param_array(vendor_firsts, int, NULL, 0444);
76module_param_array(vendor_counts, int, NULL, 0444); 76module_param_array(vendor_counts, int, NULL, 0444);
77 77
78static char *vendor_labels[CH_TYPES-4] = { 78static const char * vendor_labels[CH_TYPES-4] = {
79 "v0", "v1", "v2", "v3" 79 "v0", "v1", "v2", "v3"
80}; 80};
81// module_param_string_array(vendor_labels, NULL, 0444); 81// module_param_string_array(vendor_labels, NULL, 0444);
@@ -140,7 +140,7 @@ static struct file_operations changer_fops =
140#endif 140#endif
141}; 141};
142 142
143static struct { 143static const struct {
144 unsigned char sense; 144 unsigned char sense;
145 unsigned char asc; 145 unsigned char asc;
146 unsigned char ascq; 146 unsigned char ascq;
diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c
index 09bc81557b6e..a972c1e89e36 100644
--- a/drivers/scsi/constants.c
+++ b/drivers/scsi/constants.c
@@ -1065,7 +1065,7 @@ struct error_info2 {
1065 const char * fmt; 1065 const char * fmt;
1066}; 1066};
1067 1067
1068static struct error_info2 additional2[] = 1068static const struct error_info2 additional2[] =
1069{ 1069{
1070 {0x40,0x00,0x7f,"Ram failure (%x)"}, 1070 {0x40,0x00,0x7f,"Ram failure (%x)"},
1071 {0x40,0x80,0xff,"Diagnostic failure on component (%x)"}, 1071 {0x40,0x80,0xff,"Diagnostic failure on component (%x)"},
@@ -1077,7 +1077,7 @@ static struct error_info2 additional2[] =
1077}; 1077};
1078 1078
1079/* description of the sense key values */ 1079/* description of the sense key values */
1080static const char *snstext[] = { 1080static const char * const snstext[] = {
1081 "No Sense", /* 0: There is no sense information */ 1081 "No Sense", /* 0: There is no sense information */
1082 "Recovered Error", /* 1: The last command completed successfully 1082 "Recovered Error", /* 1: The last command completed successfully
1083 but used error correction */ 1083 but used error correction */
@@ -1279,7 +1279,7 @@ void scsi_print_req_sense(const char *devclass, struct scsi_request *sreq)
1279EXPORT_SYMBOL(scsi_print_req_sense); 1279EXPORT_SYMBOL(scsi_print_req_sense);
1280 1280
1281#ifdef CONFIG_SCSI_CONSTANTS 1281#ifdef CONFIG_SCSI_CONSTANTS
1282static const char *one_byte_msgs[] = { 1282static const char * const one_byte_msgs[] = {
1283/* 0x00 */ "Command Complete", NULL, "Save Pointers", 1283/* 0x00 */ "Command Complete", NULL, "Save Pointers",
1284/* 0x03 */ "Restore Pointers", "Disconnect", "Initiator Error", 1284/* 0x03 */ "Restore Pointers", "Disconnect", "Initiator Error",
1285/* 0x06 */ "Abort", "Message Reject", "Nop", "Message Parity Error", 1285/* 0x06 */ "Abort", "Message Reject", "Nop", "Message Parity Error",
@@ -1289,13 +1289,13 @@ static const char *one_byte_msgs[] = {
1289}; 1289};
1290#define NO_ONE_BYTE_MSGS (sizeof(one_byte_msgs) / sizeof (const char *)) 1290#define NO_ONE_BYTE_MSGS (sizeof(one_byte_msgs) / sizeof (const char *))
1291 1291
1292static const char *two_byte_msgs[] = { 1292static const char * const two_byte_msgs[] = {
1293/* 0x20 */ "Simple Queue Tag", "Head of Queue Tag", "Ordered Queue Tag" 1293/* 0x20 */ "Simple Queue Tag", "Head of Queue Tag", "Ordered Queue Tag"
1294/* 0x23 */ "Ignore Wide Residue" 1294/* 0x23 */ "Ignore Wide Residue"
1295}; 1295};
1296#define NO_TWO_BYTE_MSGS (sizeof(two_byte_msgs) / sizeof (const char *)) 1296#define NO_TWO_BYTE_MSGS (sizeof(two_byte_msgs) / sizeof (const char *))
1297 1297
1298static const char *extended_msgs[] = { 1298static const char * const extended_msgs[] = {
1299/* 0x00 */ "Modify Data Pointer", "Synchronous Data Transfer Request", 1299/* 0x00 */ "Modify Data Pointer", "Synchronous Data Transfer Request",
1300/* 0x02 */ "SCSI-I Extended Identify", "Wide Data Transfer Request" 1300/* 0x02 */ "SCSI-I Extended Identify", "Wide Data Transfer Request"
1301}; 1301};
@@ -1397,7 +1397,7 @@ EXPORT_SYMBOL(scsi_print_command);
1397 1397
1398#ifdef CONFIG_SCSI_CONSTANTS 1398#ifdef CONFIG_SCSI_CONSTANTS
1399 1399
1400static const char * hostbyte_table[]={ 1400static const char * const hostbyte_table[]={
1401"DID_OK", "DID_NO_CONNECT", "DID_BUS_BUSY", "DID_TIME_OUT", "DID_BAD_TARGET", 1401"DID_OK", "DID_NO_CONNECT", "DID_BUS_BUSY", "DID_TIME_OUT", "DID_BAD_TARGET",
1402"DID_ABORT", "DID_PARITY", "DID_ERROR", "DID_RESET", "DID_BAD_INTR", 1402"DID_ABORT", "DID_PARITY", "DID_ERROR", "DID_RESET", "DID_BAD_INTR",
1403"DID_PASSTHROUGH", "DID_SOFT_ERROR", "DID_IMM_RETRY"}; 1403"DID_PASSTHROUGH", "DID_SOFT_ERROR", "DID_IMM_RETRY"};
@@ -1422,12 +1422,12 @@ void scsi_print_hostbyte(int scsiresult)
1422 1422
1423#ifdef CONFIG_SCSI_CONSTANTS 1423#ifdef CONFIG_SCSI_CONSTANTS
1424 1424
1425static const char * driverbyte_table[]={ 1425static const char * const driverbyte_table[]={
1426"DRIVER_OK", "DRIVER_BUSY", "DRIVER_SOFT", "DRIVER_MEDIA", "DRIVER_ERROR", 1426"DRIVER_OK", "DRIVER_BUSY", "DRIVER_SOFT", "DRIVER_MEDIA", "DRIVER_ERROR",
1427"DRIVER_INVALID", "DRIVER_TIMEOUT", "DRIVER_HARD", "DRIVER_SENSE"}; 1427"DRIVER_INVALID", "DRIVER_TIMEOUT", "DRIVER_HARD", "DRIVER_SENSE"};
1428#define NUM_DRIVERBYTE_STRS (sizeof(driverbyte_table) / sizeof(const char *)) 1428#define NUM_DRIVERBYTE_STRS (sizeof(driverbyte_table) / sizeof(const char *))
1429 1429
1430static const char * driversuggest_table[]={"SUGGEST_OK", 1430static const char * const driversuggest_table[]={"SUGGEST_OK",
1431"SUGGEST_RETRY", "SUGGEST_ABORT", "SUGGEST_REMAP", "SUGGEST_DIE", 1431"SUGGEST_RETRY", "SUGGEST_ABORT", "SUGGEST_REMAP", "SUGGEST_DIE",
1432"SUGGEST_5", "SUGGEST_6", "SUGGEST_7", "SUGGEST_SENSE"}; 1432"SUGGEST_5", "SUGGEST_6", "SUGGEST_7", "SUGGEST_SENSE"};
1433#define NUM_SUGGEST_STRS (sizeof(driversuggest_table) / sizeof(const char *)) 1433#define NUM_SUGGEST_STRS (sizeof(driversuggest_table) / sizeof(const char *))
diff --git a/drivers/scsi/raid_class.c b/drivers/scsi/raid_class.c
index 5b1c12041a4f..5ec5f44602ac 100644
--- a/drivers/scsi/raid_class.c
+++ b/drivers/scsi/raid_class.c
@@ -115,7 +115,7 @@ static DECLARE_TRANSPORT_CLASS(raid_class,
115 raid_remove, 115 raid_remove,
116 NULL); 116 NULL);
117 117
118static struct { 118static const struct {
119 enum raid_state value; 119 enum raid_state value;
120 char *name; 120 char *name;
121} raid_states[] = { 121} raid_states[] = {
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 94e5167f260d..950b087e4ca2 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -74,7 +74,7 @@
74#define SCSI_SCAN_TARGET_PRESENT 1 74#define SCSI_SCAN_TARGET_PRESENT 1
75#define SCSI_SCAN_LUN_PRESENT 2 75#define SCSI_SCAN_LUN_PRESENT 2
76 76
77static char *scsi_null_device_strs = "nullnullnullnull"; 77static const char *scsi_null_device_strs = "nullnullnullnull";
78 78
79#define MAX_SCSI_LUNS 512 79#define MAX_SCSI_LUNS 512
80 80
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 46349293de08..15842b1f0f4a 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -21,7 +21,7 @@
21#include "scsi_priv.h" 21#include "scsi_priv.h"
22#include "scsi_logging.h" 22#include "scsi_logging.h"
23 23
24static struct { 24static const struct {
25 enum scsi_device_state value; 25 enum scsi_device_state value;
26 char *name; 26 char *name;
27} sdev_states[] = { 27} sdev_states[] = {
@@ -48,7 +48,7 @@ const char *scsi_device_state_name(enum scsi_device_state state)
48 return name; 48 return name;
49} 49}
50 50
51static struct { 51static const struct {
52 enum scsi_host_state value; 52 enum scsi_host_state value;
53 char *name; 53 char *name;
54} shost_states[] = { 54} shost_states[] = {
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index 6cd5931d9a54..cd95d2ae7b77 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -111,7 +111,7 @@ fc_enum_name_search(port_state, fc_port_state, fc_port_state_names)
111 111
112 112
113/* Convert fc_tgtid_binding_type values to ascii string name */ 113/* Convert fc_tgtid_binding_type values to ascii string name */
114static struct { 114static const struct {
115 enum fc_tgtid_binding_type value; 115 enum fc_tgtid_binding_type value;
116 char *name; 116 char *name;
117 int matchlen; 117 int matchlen;
@@ -149,7 +149,7 @@ get_fc_##title##_names(u32 table_key, char *buf) \
149 149
150 150
151/* Convert FC_COS bit values to ascii string name */ 151/* Convert FC_COS bit values to ascii string name */
152static struct { 152static const struct {
153 u32 value; 153 u32 value;
154 char *name; 154 char *name;
155} fc_cos_names[] = { 155} fc_cos_names[] = {
@@ -163,7 +163,7 @@ fc_bitfield_name_search(cos, fc_cos_names)
163 163
164 164
165/* Convert FC_PORTSPEED bit values to ascii string name */ 165/* Convert FC_PORTSPEED bit values to ascii string name */
166static struct { 166static const struct {
167 u32 value; 167 u32 value;
168 char *name; 168 char *name;
169} fc_port_speed_names[] = { 169} fc_port_speed_names[] = {
@@ -189,7 +189,7 @@ show_fc_fc4s (char *buf, u8 *fc4_list)
189 189
190 190
191/* Convert FC_RPORT_ROLE bit values to ascii string name */ 191/* Convert FC_RPORT_ROLE bit values to ascii string name */
192static struct { 192static const struct {
193 u32 value; 193 u32 value;
194 char *name; 194 char *name;
195} fc_remote_port_role_names[] = { 195} fc_remote_port_role_names[] = {
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index d68cea753bb2..a3fa64cf6650 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -730,7 +730,7 @@ static void get_capabilities(struct scsi_cd *cd)
730 unsigned int the_result; 730 unsigned int the_result;
731 int retries, rc, n; 731 int retries, rc, n;
732 732
733 static char *loadmech[] = 733 static const char *loadmech[] =
734 { 734 {
735 "caddy", 735 "caddy",
736 "tray", 736 "tray",
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 7ac6ea141fff..6d9078705c5b 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -17,7 +17,7 @@
17 Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs support 17 Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs support
18 */ 18 */
19 19
20static char *verstr = "20050830"; 20static const char *verstr = "20050830";
21 21
22#include <linux/module.h> 22#include <linux/module.h>
23 23
@@ -134,7 +134,7 @@ static struct st_dev_parm {
134#endif 134#endif
135/* Bit reversed order to get same names for same minors with all 135/* Bit reversed order to get same names for same minors with all
136 mode counts */ 136 mode counts */
137static char *st_formats[] = { 137static const char *st_formats[] = {
138 "", "r", "k", "s", "l", "t", "o", "u", 138 "", "r", "k", "s", "l", "t", "o", "u",
139 "m", "v", "p", "x", "a", "y", "q", "z"}; 139 "m", "v", "p", "x", "a", "y", "q", "z"};
140 140