diff options
author | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-02-20 10:51:35 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@redhat.com> | 2020-02-20 14:47:08 +0100 |
commit | 0eeef0a4d328b0da543c44678d00cfb7546b11a1 (patch) | |
tree | ab2c4c9c522bc6c7a284b794fe2b7a41d2664a73 /target/i386 | |
parent | d7ef71ef421d7ea481587b11c4cb8d25718baa4b (diff) |
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 <sw@weilnetz.de>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'target/i386')
-rw-r--r-- | target/i386/hax-all.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/target/i386/hax-all.c b/target/i386/hax-all.c index a8b6e5aeb8..a9cc51e6ce 100644 --- a/target/i386/hax-all.c +++ b/target/i386/hax-all.c @@ -367,7 +367,7 @@ static int hax_accel_init(MachineState *ms) static int hax_handle_fastmmio(CPUArchState *env, struct hax_fastmmio *hft) { if (hft->direction < 2) { - cpu_physical_memory_rw(hft->gpa, (uint8_t *) &hft->value, hft->size, + cpu_physical_memory_rw(hft->gpa, &hft->value, hft->size, hft->direction); } else { /* @@ -376,8 +376,8 @@ static int hax_handle_fastmmio(CPUArchState *env, struct hax_fastmmio *hft) * hft->direction == 2: gpa ==> gpa2 */ uint64_t value; - cpu_physical_memory_rw(hft->gpa, (uint8_t *) &value, hft->size, 0); - cpu_physical_memory_rw(hft->gpa2, (uint8_t *) &value, hft->size, 1); + cpu_physical_memory_rw(hft->gpa, &value, hft->size, 0); + cpu_physical_memory_rw(hft->gpa2, &value, hft->size, 1); } return 0; |