[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 8/9] hw/dma: Use dma_addr_t type definition when relevant
From: |
Peter Xu |
Subject: |
Re: [PATCH v2 8/9] hw/dma: Use dma_addr_t type definition when relevant |
Date: |
Tue, 4 Jan 2022 17:55:24 +0800 |
On Tue, Jan 04, 2022 at 09:54:30AM +0100, Philippe Mathieu-Daudé wrote:
> diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
> index 462f79a1f60..c3c49176110 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);
If there's a new version: Maybe also change the return value types of
dma_buf_write|read() to dma_addr_t?
It'll be changed anyway in the next patch, so not a big deal.
The rest patches looks good to me. Thanks.
--
Peter Xu
- [PATCH v2 5/9] hw/rdma/rdma_utils: Rename rdma_pci_dma_map 'len' argument, (continued)
- [PATCH v2 5/9] hw/rdma/rdma_utils: Rename rdma_pci_dma_map 'len' argument, Philippe Mathieu-Daudé, 2022/01/04
- [PATCH v2 6/9] hw/scsi: Rename SCSIRequest::resid as 'residual', Philippe Mathieu-Daudé, 2022/01/04
- [PATCH v2 7/9] hw/dma: Fix format string issues using dma_addr_t, Philippe Mathieu-Daudé, 2022/01/04
- [PATCH v2 8/9] hw/dma: Use dma_addr_t type definition when relevant, Philippe Mathieu-Daudé, 2022/01/04
- [PATCH v2 9/9] hw/dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult, Philippe Mathieu-Daudé, 2022/01/04
- Re: [PATCH v2 0/9] hw/dma: Use dma_addr_t type definition when relevant, Michael S. Tsirkin, 2022/01/06