aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx
diff options
context:
space:
mode:
authorFUJITA Tomonori <tomof@acm.org>2008-01-13 01:46:13 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-23 12:29:27 -0500
commitb80ca4f7ee36c26d300c5a8f429e73372d153379 (patch)
tree277987f64a44e793eb35c0bde3e48b582fad445a /drivers/scsi/qla2xxx
parent94aa5e5f6251ca0e1d77e083f8c2f9f40ee548c5 (diff)
[SCSI] replace sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE
This replaces sizeof sense_buffer with SCSI_SENSE_BUFFERSIZE in several LLDs. It's a preparation for the future changes to remove sense_buffer array in scsi_cmnd structure. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r--drivers/scsi/qla2xxx/qla_isr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index 798b7e87e2e1..53cbaffbb78c 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -977,13 +977,13 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt)
977 break; 977 break;
978 978
979 /* Copy Sense Data into sense buffer. */ 979 /* Copy Sense Data into sense buffer. */
980 memset(cp->sense_buffer, 0, sizeof(cp->sense_buffer)); 980 memset(cp->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
981 981
982 if (!(scsi_status & SS_SENSE_LEN_VALID)) 982 if (!(scsi_status & SS_SENSE_LEN_VALID))
983 break; 983 break;
984 984
985 if (sense_len >= sizeof(cp->sense_buffer)) 985 if (sense_len >= SCSI_SENSE_BUFFERSIZE)
986 sense_len = sizeof(cp->sense_buffer); 986 sense_len = SCSI_SENSE_BUFFERSIZE;
987 987
988 CMD_ACTUAL_SNSLEN(cp) = sense_len; 988 CMD_ACTUAL_SNSLEN(cp) = sense_len;
989 sp->request_sense_length = sense_len; 989 sp->request_sense_length = sense_len;
@@ -1061,13 +1061,13 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt)
1061 break; 1061 break;
1062 1062
1063 /* Copy Sense Data into sense buffer */ 1063 /* Copy Sense Data into sense buffer */
1064 memset(cp->sense_buffer, 0, sizeof(cp->sense_buffer)); 1064 memset(cp->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
1065 1065
1066 if (!(scsi_status & SS_SENSE_LEN_VALID)) 1066 if (!(scsi_status & SS_SENSE_LEN_VALID))
1067 break; 1067 break;
1068 1068
1069 if (sense_len >= sizeof(cp->sense_buffer)) 1069 if (sense_len >= SCSI_SENSE_BUFFERSIZE)
1070 sense_len = sizeof(cp->sense_buffer); 1070 sense_len = SCSI_SENSE_BUFFERSIZE;
1071 1071
1072 CMD_ACTUAL_SNSLEN(cp) = sense_len; 1072 CMD_ACTUAL_SNSLEN(cp) = sense_len;
1073 sp->request_sense_length = sense_len; 1073 sp->request_sense_length = sense_len;