From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RM8CF-0000PF-PB for qemu-devel@nongnu.org; Thu, 03 Nov 2011 21:03:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RM8CB-0004K2-9d for qemu-devel@nongnu.org; Thu, 03 Nov 2011 21:03:51 -0400 Received: from ozlabs.org ([203.10.76.45]:51359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RM8CA-0004Jm-Tz for qemu-devel@nongnu.org; Thu, 03 Nov 2011 21:03:47 -0400 From: David Gibson Date: Fri, 4 Nov 2011 12:03:37 +1100 Message-Id: <1320368618-22733-7-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1320368618-22733-1-git-send-email-david@gibson.dropbear.id.au> References: <1320368618-22733-1-git-send-email-david@gibson.dropbear.id.au> Subject: [Qemu-devel] [PATCH 6/7] Remove unnecessary casts from PCI DMA code in usb-ehci List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: joerg.roedel@amd.com, agraf@suse.de, qemu-devel@nongnu.org, avi@redhat.com, eduard.munteanu@linux360.ro, sw@weilnetz.de, rth@twiddle.net 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 --- hw/usb-ehci.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/usb-ehci.c b/hw/usb-ehci.c index cdd5aae..9e0e0b1 100644 --- a/hw/usb-ehci.c +++ b/hw/usb-ehci.c @@ -1107,7 +1107,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); } @@ -1122,7 +1122,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; @@ -2154,7 +2154,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", -- 1.7.7