From bfa30f3903e0542611196b21f5832a4be5775a21 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Fri, 31 Dec 2021 11:33:29 +0100 Subject: hw/dma: Use dma_addr_t type definition when relevant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update the obvious places where dma_addr_t should be used (instead of uint64_t, hwaddr, size_t, int32_t types). This allows to have &dma_addr_t type portable on 32/64-bit hosts. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20220111184309.28637-11-f4bug@amsat.org> --- hw/nvme/ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/nvme/ctrl.c') diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 462f79a1f6..c3c4917611 100644 --- a/hw/nvme/ctrl.c +++ b/hw/nvme/ctrl.c @@ -1147,7 +1147,7 @@ static uint16_t nvme_tx(NvmeCtrl *n, NvmeSg *sg, uint8_t *ptr, uint32_t len, if (sg->flags & NVME_SG_DMA) { const MemTxAttrs attrs = MEMTXATTRS_UNSPECIFIED; - uint64_t residual; + dma_addr_t residual; if (dir == NVME_TX_DIRECTION_TO_DEVICE) { residual = dma_buf_write(ptr, len, &sg->qsg, attrs); -- cgit 1.4.1