
From: Simon Glass <sjg@chromium.org> Use a constant for this size, rather than open-coding the value. Signed-off-by: Simon Glass <sjg@chromium.org> --- drivers/scsi/scsi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index bcdeda95ed1..f05ef21cfd0 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -22,7 +22,10 @@ static struct scsi_cmd tempccb; /* temporary scsi command buffer */ -DEFINE_CACHE_ALIGN_BUFFER(u8, tempbuff, 512); /* temporary data buffer */ +/* temporary data buffer */ +#define TEMPBUFF_SIZE 512 + +DEFINE_CACHE_ALIGN_BUFFER(u8, tempbuff, TEMPBUFF_SIZE); /* almost the maximum amount of the scsi_ext command.. */ #define SCSI_MAX_BLK 0xFFFF @@ -404,7 +407,7 @@ static int scsi_detect_dev(struct udevice *dev, int target, int lun, pccb->target = target; pccb->lun = lun; pccb->pdata = tempbuff; - pccb->datalen = 512; + pccb->datalen = TEMPBUFF_SIZE; pccb->dma_dir = DMA_FROM_DEVICE; scsi_setup_inquiry(pccb); if (scsi_exec(dev, pccb)) { -- 2.43.0