diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2021-12-16 11:24:56 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@redhat.com> | 2021-12-30 17:16:32 +0100 |
commit | c0ee1527358474c75067993d1bb233ad3a4ee081 (patch) | |
tree | bd10cdca9e547ff9eafff0a0f97667af3267b813 /softmmu | |
parent | a1d4b0a3051b3079c8db607f519bc0fcb30e17ec (diff) | |
download | qemu-c0ee1527358474c75067993d1bb233ad3a4ee081.zip qemu-c0ee1527358474c75067993d1bb233ad3a4ee081.tar.gz qemu-c0ee1527358474c75067993d1bb233ad3a4ee081.tar.bz2 |
dma: Have dma_buf_rw() take a void pointer
DMA operations are run on any kind of buffer, not arrays of
uint8_t. Convert dma_buf_rw() to take a void pointer argument
to save us pointless casts to uint8_t *.
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20211223115554.3155328-8-philmd@redhat.com>
Diffstat (limited to 'softmmu')
-rw-r--r-- | softmmu/dma-helpers.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/softmmu/dma-helpers.c b/softmmu/dma-helpers.c index 3c06a2f..09e2999 100644 --- a/softmmu/dma-helpers.c +++ b/softmmu/dma-helpers.c @@ -294,9 +294,10 @@ BlockAIOCB *dma_blk_write(BlockBackend *blk, } -static uint64_t dma_buf_rw(uint8_t *ptr, int32_t len, QEMUSGList *sg, +static uint64_t dma_buf_rw(void *buf, int32_t len, QEMUSGList *sg, DMADirection dir) { + uint8_t *ptr = buf; uint64_t resid; int sg_cur_index; |