aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_error.c
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/scsi_error.c
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/scsi_error.c')
-rw-r--r--drivers/scsi/scsi_error.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 169bc595648a..547e85aa414f 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -625,7 +625,7 @@ void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd, struct scsi_eh_save *ses,
625 625
626 if (sense_bytes) { 626 if (sense_bytes) {
627 scmd->request_bufflen = min_t(unsigned, 627 scmd->request_bufflen = min_t(unsigned,
628 sizeof(scmd->sense_buffer), sense_bytes); 628 SCSI_SENSE_BUFFERSIZE, sense_bytes);
629 sg_init_one(&ses->sense_sgl, scmd->sense_buffer, 629 sg_init_one(&ses->sense_sgl, scmd->sense_buffer,
630 scmd->request_bufflen); 630 scmd->request_bufflen);
631 scmd->request_buffer = &ses->sense_sgl; 631 scmd->request_buffer = &ses->sense_sgl;
@@ -657,7 +657,7 @@ void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd, struct scsi_eh_save *ses,
657 * Zero the sense buffer. The scsi spec mandates that any 657 * Zero the sense buffer. The scsi spec mandates that any
658 * untransferred sense data should be interpreted as being zero. 658 * untransferred sense data should be interpreted as being zero.
659 */ 659 */
660 memset(scmd->sense_buffer, 0, sizeof(scmd->sense_buffer)); 660 memset(scmd->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
661} 661}
662EXPORT_SYMBOL(scsi_eh_prep_cmnd); 662EXPORT_SYMBOL(scsi_eh_prep_cmnd);
663 663
@@ -1820,7 +1820,7 @@ int scsi_command_normalize_sense(struct scsi_cmnd *cmd,
1820 struct scsi_sense_hdr *sshdr) 1820 struct scsi_sense_hdr *sshdr)
1821{ 1821{
1822 return scsi_normalize_sense(cmd->sense_buffer, 1822 return scsi_normalize_sense(cmd->sense_buffer,
1823 sizeof(cmd->sense_buffer), sshdr); 1823 SCSI_SENSE_BUFFERSIZE, sshdr);
1824} 1824}
1825EXPORT_SYMBOL(scsi_command_normalize_sense); 1825EXPORT_SYMBOL(scsi_command_normalize_sense);
1826 1826