aboutsummaryrefslogtreecommitdiff
path: root/hw/misc
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-04-19 08:38:16 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-04-19 08:38:16 -0500
commitf691df528340807d42247fe79a89ea88e6303e1d (patch)
treea7d723e846a4754e994026e08d7609c3ea6d3f6f /hw/misc
parent5dff24bebae5103810002ea76b1d03927e2148f2 (diff)
parentad6b40f471cf8bf7b106032145b1b2ac105f99cf (diff)
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
# By Stefan Weil (3) and others # Via Stefan Hajnoczi * stefanha/trivial-patches: m25p80: Remove bogus include of devices.h ssh: Remove unnecessary use of strlen function. block/ssh: Add missing gcc format attributes linux-user: change do_semop to return target errno when unsuccessful w64: Fix compiler warnings (wrong format specifier) Remove unneeded type casts virtio.h: drop unused function prototypes bswap: fix compiler warning Message-id: 1366371241-23430-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/misc')
-rw-r--r--hw/misc/macio/mac_dbdma.c8
-rw-r--r--hw/misc/milkymist-pfpu.c4
2 files changed, 6 insertions, 6 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;
diff --git a/hw/misc/milkymist-pfpu.c b/hw/misc/milkymist-pfpu.c
index ad44b4db22..fe1b039550 100644
--- a/hw/misc/milkymist-pfpu.c
+++ b/hw/misc/milkymist-pfpu.c
@@ -228,8 +228,8 @@ static int pfpu_decode_insn(MilkymistPFPUState *s)
hwaddr dma_ptr =
get_dma_address(s->regs[R_MESHBASE],
s->gp_regs[GPR_X], s->gp_regs[GPR_Y]);
- cpu_physical_memory_write(dma_ptr, (uint8_t *)&a, 4);
- cpu_physical_memory_write(dma_ptr + 4, (uint8_t *)&b, 4);
+ cpu_physical_memory_write(dma_ptr, &a, 4);
+ cpu_physical_memory_write(dma_ptr + 4, &b, 4);
s->regs[R_LASTDMA] = dma_ptr + 4;
D_EXEC(qemu_log("VECTOUT a=%08x b=%08x dma=%08x\n", a, b, dma_ptr));
trace_milkymist_pfpu_vectout(a, b, dma_ptr);