aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2011-11-04 12:03:37 +1100
committerAnthony Liguori <aliguori@us.ibm.com>2011-12-12 11:16:52 -0600
commit4bf8011910580376950dfed63214d1e0de4853eb (patch)
treea5aa55d45c6b435be1dcb259591d1849eade2b53
parenta6a29eeaff88fafe344d072b6d9cd30649a46b36 (diff)
Remove unnecessary casts from PCI DMA code in usb-ehci
This patch removes some unnecessary casts in the usb-ehci device, introduced by commit 68d553587c0aa271c3eb2902921b503740d775b6 'usb-ehci: Use PCI DMA stub functions'. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--hw/usb-ehci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c
index a946e1d1fd..7c926c0d47 100644
--- a/hw/usb-ehci.c
+++ b/hw/usb-ehci.c
@@ -1109,7 +1109,7 @@ static inline int get_dwords(EHCIState *ehci, uint32_t addr,
int i;
for(i = 0; i < num; i++, buf++, addr += sizeof(*buf)) {
- pci_dma_read(&ehci->dev, addr, (uint8_t *)buf, sizeof(*buf));
+ pci_dma_read(&ehci->dev, addr, buf, sizeof(*buf));
*buf = le32_to_cpu(*buf);
}
@@ -1124,7 +1124,7 @@ static inline int put_dwords(EHCIState *ehci, uint32_t addr,
for(i = 0; i < num; i++, buf++, addr += sizeof(*buf)) {
uint32_t tmp = cpu_to_le32(*buf);
- pci_dma_write(&ehci->dev, addr, (uint8_t *)&tmp, sizeof(tmp));
+ pci_dma_write(&ehci->dev, addr, &tmp, sizeof(tmp));
}
return 1;
@@ -2157,7 +2157,7 @@ static void ehci_advance_periodic_state(EHCIState *ehci)
}
list |= ((ehci->frindex & 0x1ff8) >> 1);
- pci_dma_read(&ehci->dev, list, (uint8_t *) &entry, sizeof entry);
+ pci_dma_read(&ehci->dev, list, &entry, sizeof entry);
entry = le32_to_cpu(entry);
DPRINTF("PERIODIC state adv fr=%d. [%08X] -> %08X\n",