diff options
Diffstat (limited to 'drivers/scsi/3w-xxxx.c')
-rw-r--r-- | drivers/scsi/3w-xxxx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c index 37a58c6dad29..17dbd4ac8692 100644 --- a/drivers/scsi/3w-xxxx.c +++ b/drivers/scsi/3w-xxxx.c | |||
@@ -405,7 +405,7 @@ static int tw_decode_sense(TW_Device_Extension *tw_dev, int request_id, int fill | |||
405 | /* Attempt to return intelligent sense information */ | 405 | /* Attempt to return intelligent sense information */ |
406 | if (fill_sense) { | 406 | if (fill_sense) { |
407 | if ((command->status == 0xc7) || (command->status == 0xcb)) { | 407 | if ((command->status == 0xc7) || (command->status == 0xcb)) { |
408 | for (i=0;i<(sizeof(tw_sense_table)/sizeof(tw_sense_table[0]));i++) { | 408 | for (i = 0; i < ARRAY_SIZE(tw_sense_table); i++) { |
409 | if (command->flags == tw_sense_table[i][0]) { | 409 | if (command->flags == tw_sense_table[i][0]) { |
410 | 410 | ||
411 | /* Valid bit and 'current errors' */ | 411 | /* Valid bit and 'current errors' */ |
@@ -625,7 +625,7 @@ static int tw_aen_complete(TW_Device_Extension *tw_dev, int request_id) | |||
625 | if (aen == 0x0ff) { | 625 | if (aen == 0x0ff) { |
626 | printk(KERN_WARNING "3w-xxxx: scsi%d: AEN: INFO: AEN queue overflow.\n", tw_dev->host->host_no); | 626 | printk(KERN_WARNING "3w-xxxx: scsi%d: AEN: INFO: AEN queue overflow.\n", tw_dev->host->host_no); |
627 | } else { | 627 | } else { |
628 | table_max = sizeof(tw_aen_string)/sizeof(char *); | 628 | table_max = ARRAY_SIZE(tw_aen_string); |
629 | if ((aen & 0x0ff) < table_max) { | 629 | if ((aen & 0x0ff) < table_max) { |
630 | if ((tw_aen_string[aen & 0xff][strlen(tw_aen_string[aen & 0xff])-1]) == '#') { | 630 | if ((tw_aen_string[aen & 0xff][strlen(tw_aen_string[aen & 0xff])-1]) == '#') { |
631 | printk(KERN_WARNING "3w-xxxx: scsi%d: AEN: %s%d.\n", tw_dev->host->host_no, tw_aen_string[aen & 0xff], aen >> 8); | 631 | printk(KERN_WARNING "3w-xxxx: scsi%d: AEN: %s%d.\n", tw_dev->host->host_no, tw_aen_string[aen & 0xff], aen >> 8); |
@@ -786,7 +786,7 @@ static int tw_aen_drain_queue(TW_Device_Extension *tw_dev) | |||
786 | if (aen == 0x0ff) { | 786 | if (aen == 0x0ff) { |
787 | printk(KERN_WARNING "3w-xxxx: AEN: INFO: AEN queue overflow.\n"); | 787 | printk(KERN_WARNING "3w-xxxx: AEN: INFO: AEN queue overflow.\n"); |
788 | } else { | 788 | } else { |
789 | table_max = sizeof(tw_aen_string)/sizeof(char *); | 789 | table_max = ARRAY_SIZE(tw_aen_string); |
790 | if ((aen & 0x0ff) < table_max) { | 790 | if ((aen & 0x0ff) < table_max) { |
791 | if ((tw_aen_string[aen & 0xff][strlen(tw_aen_string[aen & 0xff])-1]) == '#') { | 791 | if ((tw_aen_string[aen & 0xff][strlen(tw_aen_string[aen & 0xff])-1]) == '#') { |
792 | printk(KERN_WARNING "3w-xxxx: AEN: %s%d.\n", tw_aen_string[aen & 0xff], aen >> 8); | 792 | printk(KERN_WARNING "3w-xxxx: AEN: %s%d.\n", tw_aen_string[aen & 0xff], aen >> 8); |