aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2020-02-19 20:28:22 +0100
committerPhilippe Mathieu-Daudé <philmd@redhat.com>2020-02-20 14:47:08 +0100
commitb7cbebf2b9d7aa8854cfd6a45484e160244e9f48 (patch)
treebc79526f8e8936820d3a52fdef813a18221fb2c4 /scripts
parent4ef044cb148a5238161310f06bc581aeed70059f (diff)
downloadqemu-b7cbebf2b9d7aa8854cfd6a45484e160244e9f48.zip
qemu-b7cbebf2b9d7aa8854cfd6a45484e160244e9f48.tar.gz
qemu-b7cbebf2b9d7aa8854cfd6a45484e160244e9f48.tar.bz2
Remove unnecessary cast when using the address_space API
This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Two lines in hw/net/dp8393x.c that Coccinelle produced that were over 80 characters were re-wrapped by hand. Suggested-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/coccinelle/exec_rw_const.cocci15
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/coccinelle/exec_rw_const.cocci b/scripts/coccinelle/exec_rw_const.cocci
index 87897dd..fe2cf91 100644
--- a/scripts/coccinelle/exec_rw_const.cocci
+++ b/scripts/coccinelle/exec_rw_const.cocci
@@ -25,10 +25,23 @@ expression E1, E2, E3, E4;
// Remove useless cast
@@
-expression E1, E2, E3, E4;
+expression E1, E2, E3, E4, E5, E6;
type T;
@@
(
+- address_space_rw(E1, E2, E3, (T *)(E4), E5, E6)
++ address_space_rw(E1, E2, E3, E4, E5, E6)
+|
+- address_space_read(E1, E2, E3, (T *)(E4), E5)
++ address_space_read(E1, E2, E3, E4, E5)
+|
+- address_space_write(E1, E2, E3, (T *)(E4), E5)
++ address_space_write(E1, E2, E3, E4, E5)
+|
+- address_space_write_rom(E1, E2, E3, (T *)(E4), E5)
++ address_space_write_rom(E1, E2, E3, E4, E5)
+|
+
- dma_memory_read(E1, E2, (T *)(E3), E4)
+ dma_memory_read(E1, E2, E3, E4)
|