diff options
author | Arjan van de Ven <arjan@infradead.org> | 2005-11-28 10:22:25 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-12-13 20:11:01 -0500 |
commit | 0ad78200baf1f85a21e6b26c225717ad80980d8f (patch) | |
tree | 7f5ffcd60c5bb1dd9a2ef943b2b0950bd5ac5b55 /drivers/scsi/constants.c | |
parent | ce155ccecd4094e7b5e68058d26db691713240fc (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/constants.c')
-rw-r--r-- | drivers/scsi/constants.c | 16 |
1 files changed, 8 insertions, 8 deletions
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 | ||
1068 | static struct error_info2 additional2[] = | 1068 | static 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 */ |
1080 | static const char *snstext[] = { | 1080 | static 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) | |||
1279 | EXPORT_SYMBOL(scsi_print_req_sense); | 1279 | EXPORT_SYMBOL(scsi_print_req_sense); |
1280 | 1280 | ||
1281 | #ifdef CONFIG_SCSI_CONSTANTS | 1281 | #ifdef CONFIG_SCSI_CONSTANTS |
1282 | static const char *one_byte_msgs[] = { | 1282 | static 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 | ||
1292 | static const char *two_byte_msgs[] = { | 1292 | static 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 | ||
1298 | static const char *extended_msgs[] = { | 1298 | static 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 | ||
1400 | static const char * hostbyte_table[]={ | 1400 | static 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 | ||
1425 | static const char * driverbyte_table[]={ | 1425 | static 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 | ||
1430 | static const char * driversuggest_table[]={"SUGGEST_OK", | 1430 | static 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 *)) |