aboutsummaryrefslogtreecommitdiff
path: root/hw/eepro100.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2011-11-04 12:03:32 +1100
committerAnthony Liguori <aliguori@us.ibm.com>2011-12-12 11:16:50 -0600
commite965d4bce3ebbb5a33bba24926a8f6ba0825994c (patch)
tree8e810026e7c976bc8961aaf7056b39e45e111f83 /hw/eepro100.c
parentab23ebf48510c12d80f95b56f628afde3ca2c1c2 (diff)
Remove unnecessary casts from PCI DMA code in eepro100
This patch removes some unnecessary casts in the eepro100 device, introduced by commit 16ef60c9a8eeee269f7cbc95219a431b1d7cbf29 'eepro100: Use PCI DMA stub functions'. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/eepro100.c')
-rw-r--r--hw/eepro100.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/eepro100.c b/hw/eepro100.c
index 29ec5b44f8..17bcfd8325 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -713,8 +713,7 @@ static void dump_statistics(EEPRO100State * s)
* values which really matter.
* Number of data should check configuration!!!
*/
- pci_dma_write(&s->dev, s->statsaddr,
- (uint8_t *) &s->statistics, s->stats_size);
+ pci_dma_write(&s->dev, s->statsaddr, &s->statistics, s->stats_size);
stl_le_pci_dma(&s->dev, s->statsaddr + 0,
s->statistics.tx_good_frames);
stl_le_pci_dma(&s->dev, s->statsaddr + 36,
@@ -732,7 +731,7 @@ static void dump_statistics(EEPRO100State * s)
static void read_cb(EEPRO100State *s)
{
- pci_dma_read(&s->dev, s->cb_address, (uint8_t *) &s->tx, sizeof(s->tx));
+ pci_dma_read(&s->dev, s->cb_address, &s->tx, sizeof(s->tx));
s->tx.status = le16_to_cpu(s->tx.status);
s->tx.command = le16_to_cpu(s->tx.command);
s->tx.link = le32_to_cpu(s->tx.link);
@@ -1715,7 +1714,7 @@ static ssize_t nic_receive(VLANClientState *nc, const uint8_t * buf, size_t size
/* !!! */
eepro100_rx_t rx;
pci_dma_read(&s->dev, s->ru_base + s->ru_offset,
- (uint8_t *) &rx, sizeof(eepro100_rx_t));
+ &rx, sizeof(eepro100_rx_t));
uint16_t rfd_command = le16_to_cpu(rx.command);
uint16_t rfd_size = le16_to_cpu(rx.size);