diff options
author | Philippe Mathieu-Daudé | 2020-08-22 20:09:49 +0200 |
---|---|---|
committer | Laurent Vivier | 2020-09-11 21:25:59 +0200 |
commit | 67263b33af9506d78558b1edfa5a9bf976dc7b3d (patch) | |
tree | ad3ac55019240c2efb2cb67bcd24cbe0bf76bdbb /hw | |
parent | hw/arm/pxa2xx: Add missing fallthrough comment (diff) | |
download | qemu-67263b33af9506d78558b1edfa5a9bf976dc7b3d.tar.gz qemu-67263b33af9506d78558b1edfa5a9bf976dc7b3d.tar.xz qemu-67263b33af9506d78558b1edfa5a9bf976dc7b3d.zip |
util/hexdump: Convert to take a void pointer argument
Most uses of qemu_hexdump() do not take an array of char
as input, forcing use of cast. Since we can use this
helper to dump any kind of buffer, use a pointer to void
argument instead.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20200822180950.1343963-2-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/dma/xlnx_dpdma.c | 2 | ||||
-rw-r--r-- | hw/net/fsl_etsec/etsec.c | 2 | ||||
-rw-r--r-- | hw/sd/sd.c | 2 | ||||
-rw-r--r-- | hw/usb/redirect.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/hw/dma/xlnx_dpdma.c b/hw/dma/xlnx_dpdma.c index b40c897de2..d75a806942 100644 --- a/hw/dma/xlnx_dpdma.c +++ b/hw/dma/xlnx_dpdma.c @@ -388,7 +388,7 @@ static void xlnx_dpdma_dump_descriptor(DPDMADescriptor *desc) { if (DEBUG_DPDMA) { qemu_log("DUMP DESCRIPTOR:\n"); - qemu_hexdump((char *)desc, stdout, "", sizeof(DPDMADescriptor)); + qemu_hexdump(desc, stdout, "", sizeof(DPDMADescriptor)); } } diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c index ad20b22cdd..5c40303f93 100644 --- a/hw/net/fsl_etsec/etsec.c +++ b/hw/net/fsl_etsec/etsec.c @@ -357,7 +357,7 @@ static ssize_t etsec_receive(NetClientState *nc, #if defined(HEX_DUMP) fprintf(stderr, "%s receive size:%zd\n", nc->name, size); - qemu_hexdump((void *)buf, stderr, "", size); + qemu_hexdump(buf, stderr, "", size); #endif /* Flush is unnecessary as are already in receiving path */ etsec->need_flush = false; diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 483c4f1720..1c8f8529ea 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -1785,7 +1785,7 @@ send_response: } #ifdef DEBUG_SD - qemu_hexdump((const char *)response, stderr, "Response", rsplen); + qemu_hexdump(response, stderr, "Response", rsplen); #endif return rsplen; diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 417a60a2e6..09edb0d81c 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -240,7 +240,7 @@ static void usbredir_log_data(USBRedirDevice *dev, const char *desc, if (dev->debug < usbredirparser_debug_data) { return; } - qemu_hexdump((char *)data, stderr, desc, len); + qemu_hexdump(data, stderr, desc, len); } /* |