[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/7] hw/ide/pci: Replace magic '512' value by BDRV_SECTOR_SIZE
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 6/7] hw/ide/pci: Replace magic '512' value by BDRV_SECTOR_SIZE |
Date: |
Fri, 14 Aug 2020 10:28:40 +0200 |
Use self-explicit definitions instead of magic '512' value.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/ide/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/ide/pci.c b/hw/ide/pci.c
index 5e85c4ad17..b50091b615 100644
--- a/hw/ide/pci.c
+++ b/hw/ide/pci.c
@@ -138,7 +138,7 @@ static int32_t bmdma_prepare_buf(const IDEDMA *dma, int32_t
limit)
int l, len;
pci_dma_sglist_init(&s->sg, pci_dev,
- s->nsector / (BMDMA_PAGE_SIZE / 512) + 1);
+ s->nsector / (BMDMA_PAGE_SIZE / BDRV_SECTOR_SIZE) + 1);
s->io_buffer_size = 0;
for(;;) {
if (bm->cur_prd_len == 0) {
--
2.21.3
- [PATCH 3/7] hw/ide/core: Replace magic '512' value by BDRV_SECTOR_SIZE, (continued)
- [PATCH 3/7] hw/ide/core: Replace magic '512' value by BDRV_SECTOR_SIZE, Philippe Mathieu-Daudé, 2020/08/14
- [PATCH 4/7] hw/ide/ahci: Replace magic '512' value by BDRV_SECTOR_SIZE, Philippe Mathieu-Daudé, 2020/08/14
- [PATCH 5/7] hw/ide/atapi: Replace magic '512' value by BDRV_SECTOR_SIZE, Philippe Mathieu-Daudé, 2020/08/14
- [PATCH 6/7] hw/ide/pci: Replace magic '512' value by BDRV_SECTOR_SIZE,
Philippe Mathieu-Daudé <=
- [PATCH 7/7] hw/scsi/scsi-disk: Replace magic '512' value by BDRV_SECTOR_SIZE, Philippe Mathieu-Daudé, 2020/08/14
- Re: [PATCH 0/7] block: Use definitions instead of magic values, Stefano Garzarella, 2020/08/17