5 --macro-file scripts/cocci-macro-file.h \
6 --sp-file scripts/coccinelle/exec_rw_const.cocci \
14 expression E1, E2, E3, E4, E5;
17 - address_space_rw(E1, E2, E3, E4, E5, 0)
18 + address_space_rw(E1, E2, E3, E4, E5, false)
20 - address_space_rw(E1, E2, E3, E4, E5, 1)
21 + address_space_rw(E1, E2, E3, E4, E5, true)
24 - cpu_physical_memory_rw(E1, E2, E3, 0)
25 + cpu_physical_memory_rw(E1, E2, E3, false)
27 - cpu_physical_memory_rw(E1, E2, E3, 1)
28 + cpu_physical_memory_rw(E1, E2, E3, true)
31 - cpu_physical_memory_map(E1, E2, 0)
32 + cpu_physical_memory_map(E1, E2, false)
34 - cpu_physical_memory_map(E1, E2, 1)
35 + cpu_physical_memory_map(E1, E2, true)
38 // Use address_space_write instead of casting to non-const
42 expression E1, E2, E3, E4;
45 - address_space_rw(E1, E2, E3, (T *)V, E4, 1)
46 + address_space_write(E1, E2, E3, V, E4)
48 - address_space_rw(E1, E2, E3, (void *)V, E4, 1)
49 + address_space_write(E1, E2, E3, V, E4)
52 // Avoid uses of address_space_rw() with a constant is_write argument.
54 expression E1, E2, E3, E4, E5;
58 - address_space_rw(E1, E2, E3, E4, E5, false)
59 + address_space_read(E1, E2, E3, E4, E5)
61 - address_space_rw(E1, E2, E3, E4, E5, true)
62 + address_space_write(E1, E2, E3, E4, E5)
65 // Avoid uses of cpu_physical_memory_rw() with a constant is_write argument.
67 expression E1, E2, E3;
70 - cpu_physical_memory_rw(E1, E2, E3, false)
71 + cpu_physical_memory_read(E1, E2, E3)
73 - cpu_physical_memory_rw(E1, E2, E3, true)
74 + cpu_physical_memory_write(E1, E2, E3)
77 // Remove useless cast
79 expression E1, E2, E3, E4, E5, E6;
83 - address_space_rw(E1, E2, E3, (T *)(E4), E5, E6)
84 + address_space_rw(E1, E2, E3, E4, E5, E6)
86 - address_space_read(E1, E2, E3, (T *)(E4), E5)
87 + address_space_read(E1, E2, E3, E4, E5)
89 - address_space_write(E1, E2, E3, (T *)(E4), E5)
90 + address_space_write(E1, E2, E3, E4, E5)
92 - address_space_write_rom(E1, E2, E3, (T *)(E4), E5)
93 + address_space_write_rom(E1, E2, E3, E4, E5)
96 - cpu_physical_memory_rw(E1, (T *)(E2), E3, E4)
97 + cpu_physical_memory_rw(E1, E2, E3, E4)
99 - cpu_physical_memory_read(E1, (T *)(E2), E3)
100 + cpu_physical_memory_read(E1, E2, E3)
102 - cpu_physical_memory_write(E1, (T *)(E2), E3)
103 + cpu_physical_memory_write(E1, E2, E3)
106 - dma_memory_read(E1, E2, (T *)(E3), E4)
107 + dma_memory_read(E1, E2, E3, E4)
109 - dma_memory_write(E1, E2, (T *)(E3), E4)
110 + dma_memory_write(E1, E2, E3, E4)