From 0eeef0a4d328b0da543c44678d00cfb7546b11a1 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Thu, 20 Feb 2020 10:51:35 +0100 Subject: Remove unnecessary cast when using the cpu_[physical]_memory API This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Suggested-by: Stefan Weil Signed-off-by: Philippe Mathieu-Daudé --- scripts/coccinelle/exec_rw_const.cocci | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'scripts/coccinelle') diff --git a/scripts/coccinelle/exec_rw_const.cocci b/scripts/coccinelle/exec_rw_const.cocci index fe2cf917c2..9c14165fc0 100644 --- a/scripts/coccinelle/exec_rw_const.cocci +++ b/scripts/coccinelle/exec_rw_const.cocci @@ -42,6 +42,16 @@ type T; + address_space_write_rom(E1, E2, E3, E4, E5) | +- cpu_physical_memory_rw(E1, (T *)(E2), E3, E4) ++ cpu_physical_memory_rw(E1, E2, E3, E4) +| +- cpu_physical_memory_read(E1, (T *)(E2), E3) ++ cpu_physical_memory_read(E1, E2, E3) +| +- cpu_physical_memory_write(E1, (T *)(E2), E3) ++ cpu_physical_memory_write(E1, E2, E3) +| + - dma_memory_read(E1, E2, (T *)(E3), E4) + dma_memory_read(E1, E2, E3, E4) | -- cgit v1.2.3-55-g7522