mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
Avoid cpu_physical_memory_rw() with a constant is_write argument
This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Inspired-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
85eb7c18ee
commit
adeefe0167
3 changed files with 15 additions and 3 deletions
|
@ -62,6 +62,18 @@ symbol true, false;
|
|||
+ address_space_write(E1, E2, E3, E4, E5)
|
||||
)
|
||||
|
||||
// Avoid uses of cpu_physical_memory_rw() with a constant is_write argument.
|
||||
@@
|
||||
expression E1, E2, E3;
|
||||
@@
|
||||
(
|
||||
- cpu_physical_memory_rw(E1, E2, E3, false)
|
||||
+ cpu_physical_memory_read(E1, E2, E3)
|
||||
|
|
||||
- cpu_physical_memory_rw(E1, E2, E3, true)
|
||||
+ cpu_physical_memory_write(E1, E2, E3)
|
||||
)
|
||||
|
||||
// Remove useless cast
|
||||
@@
|
||||
expression E1, E2, E3, E4, E5, E6;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue