diff options
author | Juan Quintela <quintela@redhat.com> | 2009-08-24 18:42:35 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-08-27 20:46:58 -0500 |
commit | d986bd50864db9a98938d60bf803c04ef03ecedc (patch) | |
tree | c6360ef92e64eddcc66cee3847e937244e54a7f6 | |
parent | df7a86ed735eafefbd046c8cad7134652fe3f600 (diff) | |
download | qemu-d986bd50864db9a98938d60bf803c04ef03ecedc.zip qemu-d986bd50864db9a98938d60bf803c04ef03ecedc.tar.gz qemu-d986bd50864db9a98938d60bf803c04ef03ecedc.tar.bz2 |
eepro100: convert casts to DO_UPCAST()
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | hw/eepro100.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/eepro100.c b/hw/eepro100.c index 6c5e989..722eb5a 100644 --- a/hw/eepro100.c +++ b/hw/eepro100.c @@ -1350,7 +1350,7 @@ typedef struct PCIEEPRO100State { static void pci_map(PCIDevice * pci_dev, int region_num, uint32_t addr, uint32_t size, int type) { - PCIEEPRO100State *d = (PCIEEPRO100State *) pci_dev; + PCIEEPRO100State *d = DO_UPCAST(PCIEEPRO100State, dev, pci_dev); EEPRO100State *s = &d->eepro100; logout("region %d, addr=0x%08x, size=0x%08x, type=%d\n", @@ -1424,7 +1424,7 @@ static CPUReadMemoryFunc * const pci_mmio_read[] = { static void pci_mmio_map(PCIDevice * pci_dev, int region_num, uint32_t addr, uint32_t size, int type) { - PCIEEPRO100State *d = (PCIEEPRO100State *) pci_dev; + PCIEEPRO100State *d = DO_UPCAST(PCIEEPRO100State, dev, pci_dev); logout("region %d, addr=0x%08x, size=0x%08x, type=%d\n", region_num, addr, size, type); @@ -1724,7 +1724,7 @@ static void nic_cleanup(VLANClientState *vc) static int pci_nic_uninit(PCIDevice *dev) { - PCIEEPRO100State *d = (PCIEEPRO100State *) dev; + PCIEEPRO100State *d = DO_UPCAST(PCIEEPRO100State, dev, dev); EEPRO100State *s = &d->eepro100; cpu_unregister_io_memory(s->mmio_index); @@ -1734,7 +1734,7 @@ static int pci_nic_uninit(PCIDevice *dev) static int nic_init(PCIDevice *pci_dev, uint32_t device) { - PCIEEPRO100State *d = (PCIEEPRO100State *)pci_dev; + PCIEEPRO100State *d = DO_UPCAST(PCIEEPRO100State, dev, pci_dev); EEPRO100State *s; logout("\n"); |