瀏覽代碼

[libata] Prefer SCSI_SENSE_BUFFERSIZE to sizeof()

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>
akpm@linux-foundation.org 17 年之前
父節點
當前提交
cadb7345d9
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/ata/libata-scsi.c

+ 1 - 1
drivers/ata/libata-scsi.c

@@ -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;