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/misc/macio/mac_dbdma.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/misc/macio/mac_dbdma.c')
-rw-r--r-- | hw/misc/macio/mac_dbdma.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/misc/macio/mac_dbdma.c b/hw/misc/macio/mac_dbdma.c index a2363bbdf2..2fc7f87bb6 100644 --- a/hw/misc/macio/mac_dbdma.c +++ b/hw/misc/macio/mac_dbdma.c @@ -192,7 +192,7 @@ static void dbdma_cmdptr_load(DBDMA_channel *ch) DBDMA_DPRINTF("dbdma_cmdptr_load 0x%08x\n", ch->regs[DBDMA_CMDPTR_LO]); cpu_physical_memory_read(ch->regs[DBDMA_CMDPTR_LO], - (uint8_t*)&ch->current, sizeof(dbdma_cmd)); + &ch->current, sizeof(dbdma_cmd)); } static void dbdma_cmdptr_save(DBDMA_channel *ch) @@ -203,7 +203,7 @@ static void dbdma_cmdptr_save(DBDMA_channel *ch) le16_to_cpu(ch->current.xfer_status), le16_to_cpu(ch->current.res_count)); cpu_physical_memory_write(ch->regs[DBDMA_CMDPTR_LO], - (uint8_t*)&ch->current, sizeof(dbdma_cmd)); + &ch->current, sizeof(dbdma_cmd)); } static void kill_channel(DBDMA_channel *ch) @@ -454,7 +454,7 @@ static void load_word(DBDMA_channel *ch, int key, uint32_t addr, return; } - cpu_physical_memory_read(addr, (uint8_t*)&val, len); + cpu_physical_memory_read(addr, &val, len); if (len == 2) val = (val << 16) | (current->cmd_dep & 0x0000ffff); @@ -499,7 +499,7 @@ static void store_word(DBDMA_channel *ch, int key, uint32_t addr, else if (len == 1) val >>= 24; - cpu_physical_memory_write(addr, (uint8_t*)&val, len); + cpu_physical_memory_write(addr, &val, len); if (conditional_wait(ch)) goto wait; |