diff options
author | Stefan Weil <sw@weilnetz.de> | 2013-04-12 20:53:58 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-04-19 11:36:33 +0200 |
commit | e1fe50dcb3c86e25ce482a7f67f2ac5405bced8a (patch) | |
tree | 065342a959517395be8db91c7dca32a496cdcb6f /hw/arm/armv7m.c | |
parent | fd1ca7e0d5f76c6787428171355bcde49133c9c1 (diff) |
Remove unneeded type casts
cpu_physical_memory_read, cpu_physical_memory_write take any pointer
as 2nd argument without needing a type cast.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/arm/armv7m.c')
-rw-r--r-- | hw/arm/armv7m.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index 2ae3576760..93422bc7be 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -56,7 +56,7 @@ static uint32_t bitband_readw(void *opaque, hwaddr offset) addr = bitband_addr(opaque, offset) & ~1; mask = (1 << ((offset >> 2) & 15)); mask = tswap16(mask); - cpu_physical_memory_read(addr, (uint8_t *)&v, 2); + cpu_physical_memory_read(addr, &v, 2); return (v & mask) != 0; } @@ -69,12 +69,12 @@ static void bitband_writew(void *opaque, hwaddr offset, addr = bitband_addr(opaque, offset) & ~1; mask = (1 << ((offset >> 2) & 15)); mask = tswap16(mask); - cpu_physical_memory_read(addr, (uint8_t *)&v, 2); + cpu_physical_memory_read(addr, &v, 2); if (value & 1) v |= mask; else v &= ~mask; - cpu_physical_memory_write(addr, (uint8_t *)&v, 2); + cpu_physical_memory_write(addr, &v, 2); } static uint32_t bitband_readl(void *opaque, hwaddr offset) @@ -85,7 +85,7 @@ static uint32_t bitband_readl(void *opaque, hwaddr offset) addr = bitband_addr(opaque, offset) & ~3; mask = (1 << ((offset >> 2) & 31)); mask = tswap32(mask); - cpu_physical_memory_read(addr, (uint8_t *)&v, 4); + cpu_physical_memory_read(addr, &v, 4); return (v & mask) != 0; } @@ -98,12 +98,12 @@ static void bitband_writel(void *opaque, hwaddr offset, addr = bitband_addr(opaque, offset) & ~3; mask = (1 << ((offset >> 2) & 31)); mask = tswap32(mask); - cpu_physical_memory_read(addr, (uint8_t *)&v, 4); + cpu_physical_memory_read(addr, &v, 4); if (value & 1) v |= mask; else v &= ~mask; - cpu_physical_memory_write(addr, (uint8_t *)&v, 4); + cpu_physical_memory_write(addr, &v, 4); } static const MemoryRegionOps bitband_ops = { |