]> err.no Git - linux-2.6/commitdiff
[libata] Prefer SCSI_SENSE_BUFFERSIZE to sizeof()
authorakpm@linux-foundation.org <akpm@linux-foundation.org>
Wed, 16 Jan 2008 00:01:52 +0000 (16:01 -0800)
committerJeff Garzik <jeff@garzik.org>
Wed, 23 Jan 2008 10:24:16 +0000 (05:24 -0500)
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-scsi.c

index 15a4c8a20358badeb9913a66eba41cfb400fec30..989b7755af3d7e7b6ba492664bc28e4d9838994c 100644 (file)
@@ -2342,7 +2342,7 @@ static void atapi_request_sense(struct ata_queued_cmd *qc)
        ata_qc_reinit(qc);
 
        /* setup sg table and init transfer direction */
-       sg_init_one(&qc->sgent, cmd->sense_buffer, sizeof(cmd->sense_buffer));
+       sg_init_one(&qc->sgent, cmd->sense_buffer, SCSI_SENSE_BUFFERSIZE);
        ata_sg_init(qc, &qc->sgent, 1);
        qc->dma_dir = DMA_FROM_DEVICE;