aboutsummaryrefslogtreecommitdiff
path: root/scripts/coccinelle
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2020-02-19 20:20:42 +0100
committerPhilippe Mathieu-Daudé <philmd@redhat.com>2020-02-20 14:47:08 +0100
commit85eb7c18ee39e26002de6fa6abc5638af140e588 (patch)
tree70ed975b4a8b8a1bc36a2d5bcc0bf888227a2bc3 /scripts/coccinelle
parent28c80bfe8b9c2343d5b6a488cf013352d8ea59d1 (diff)
downloadqemu-85eb7c18ee39e26002de6fa6abc5638af140e588.zip
qemu-85eb7c18ee39e26002de6fa6abc5638af140e588.tar.gz
qemu-85eb7c18ee39e26002de6fa6abc5638af140e588.tar.bz2
Let cpu_[physical]_memory() calls pass a boolean 'is_write' argument
Use an explicit boolean type. This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'scripts/coccinelle')
-rw-r--r--scripts/coccinelle/exec_rw_const.cocci14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/coccinelle/exec_rw_const.cocci b/scripts/coccinelle/exec_rw_const.cocci
index 4f0e634..35ab79e 100644
--- a/scripts/coccinelle/exec_rw_const.cocci
+++ b/scripts/coccinelle/exec_rw_const.cocci
@@ -19,6 +19,20 @@ expression E1, E2, E3, E4, E5;
|
- address_space_rw(E1, E2, E3, E4, E5, 1)
+ address_space_rw(E1, E2, E3, E4, E5, true)
+|
+
+- cpu_physical_memory_rw(E1, E2, E3, 0)
++ cpu_physical_memory_rw(E1, E2, E3, false)
+|
+- cpu_physical_memory_rw(E1, E2, E3, 1)
++ cpu_physical_memory_rw(E1, E2, E3, true)
+|
+
+- cpu_physical_memory_map(E1, E2, 0)
++ cpu_physical_memory_map(E1, E2, false)
+|
+- cpu_physical_memory_map(E1, E2, 1)
++ cpu_physical_memory_map(E1, E2, true)
)
// Use address_space_write instead of casting to non-const