Since its introduction in commit d86a77f8abb, dma_memory_read()
always accepted void pointer argument. Remove the unnecessary
casts.
This commit was produced with the included Coccinelle script
scripts/coccinelle/exec_rw_const.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
scripts/coccinelle/exec_rw_const.cocci | 15 +++++++++++++++
hw/arm/smmu-common.c | 3 +--
hw/arm/smmuv3.c | 10 ++++------
hw/sd/sdhci.c | 15 +++++----------
4 files changed, 25 insertions(+), 18 deletions(-)
create mode 100644 scripts/coccinelle/exec_rw_const.cocci
diff --git a/scripts/coccinelle/exec_rw_const.cocci
b/scripts/coccinelle/exec_rw_const.cocci
new file mode 100644
index 0000000000..a0054f009d
--- /dev/null
+++ b/scripts/coccinelle/exec_rw_const.cocci
@@ -0,0 +1,15 @@
+// Usage:
+// spatch --sp-file scripts/coccinelle/exec_rw_const.cocci --dir . --in-place
@@ -726,13 +724,10 @@ static void get_adma_description(SDHCIState *s, ADMADescr
*dscr)
}
break;
case SDHC_CTRL_ADMA2_64:
- dma_memory_read(s->dma_as, entry_addr,
- (uint8_t *)(&dscr->attr), 1);
- dma_memory_read(s->dma_as, entry_addr + 2,
- (uint8_t *)(&dscr->length), 2);
+ dma_memory_read(s->dma_as, entry_addr, (&dscr->attr), 1);
+ dma_memory_read(s->dma_as, entry_addr + 2, (&dscr->length), 2);