[PATCH 08/17] block/nvme: Use correct type void*

Philippe Mathieu-Daudé posted 17 patches 5 years, 7 months ago
There is a newer version of this series
[PATCH 08/17] block/nvme: Use correct type void*
Posted by Philippe Mathieu-Daudé 5 years, 7 months ago
qemu_try_memalign() returns a void*, qemu_vfio_dma_map() consumes
a void*. Drop the confusing uint8_t* type.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 block/nvme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/nvme.c b/block/nvme.c
index 1bba496294..095a8ec024 100644
--- a/block/nvme.c
+++ b/block/nvme.c
@@ -441,7 +441,7 @@ static void nvme_identify(BlockDriverState *bs, int namespace, Error **errp)
     NvmeIdNs *idns;
     size_t idsz_max;
     NvmeLBAF *lbaf;
-    uint8_t *resp;
+    void *resp;
     uint16_t oncs;
     int r;
     uint64_t iova;
-- 
2.21.3


Re: [PATCH 08/17] block/nvme: Use correct type void*
Posted by Stefan Hajnoczi 5 years, 7 months ago
On Thu, Jun 25, 2020 at 08:48:29PM +0200, Philippe Mathieu-Daudé wrote:
> qemu_try_memalign() returns a void*, qemu_vfio_dma_map() consumes
> a void*. Drop the confusing uint8_t* type.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  block/nvme.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>