[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/22] eepro100: convert casts to DO_UPCAST()
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 01/22] eepro100: convert casts to DO_UPCAST() |
Date: |
Mon, 24 Aug 2009 13:03:22 +0200 |
Signed-off-by: Juan Quintela <address@hidden>
---
hw/eepro100.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/eepro100.c b/hw/eepro100.c
index ec31a6a..0031d36 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -1,4 +1,4 @@
-/*
+ /*
* QEMU i8255x (PRO100) emulation
*
* Copyright (c) 2006-2007 Stefan Weil
@@ -1346,7 +1346,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",
@@ -1420,7 +1420,7 @@ static CPUReadMemoryFunc *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);
@@ -1720,7 +1720,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);
@@ -1730,7 +1730,7 @@ static int pci_nic_uninit(PCIDevice *dev)
static void 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");
--
1.6.2.5
- Re: [Qemu-devel] Coding style, C++ compatible code (was Re: [Qemu-devel] [PATCH 02/22] eepro100: cast a void * makes no sense), (continued)
- Re: [Qemu-devel] Coding style, C++ compatible code, Markus Armbruster, 2009/08/26
- Re: [Qemu-devel] Coding style, C++ compatible code, Anthony Liguori, 2009/08/26
- Re: Coding style, C++ compatible code (was Re: [Qemu-devel] [PATCH 02/22] eepro100: cast a void * makes no sense), Måns Rullgård, 2009/08/26
- Re: Coding style, C++ compatible code (was Re: [Qemu-devel] [PATCH 02/22] eepro100: cast a void * makes no sense), Reimar Döffinger, 2009/08/26
- Re: Coding style, C++ compatible code (was Re: [Qemu-devel] [PATCH 02/22] eepro100: cast a void * makes no sense), Avi Kivity, 2009/08/26
- Re: [Qemu-devel] Coding style, C++ compatible code (was Re: [Qemu-devel] [PATCH 02/22] eepro100: cast a void * makes no sense), Avi Kivity, 2009/08/26
- Re: [Qemu-devel] Coding style, C++ compatible code (was Re: [Qemu-devel] [PATCH 02/22] eepro100: cast a void * makes no sense), Jamie Lokier, 2009/08/26
- Re: [Qemu-devel] [PATCH 02/22] eepro100: cast a void * makes no sense, Gerd Hoffmann, 2009/08/24
[Qemu-devel] [PATCH 01/22] eepro100: convert casts to DO_UPCAST(),
Juan Quintela <=
[Qemu-devel] [PATCH 03/22] eepro100: Remove unused indirection of PCIDevice, Juan Quintela, 2009/08/24
[Qemu-devel] [PATCH 04/22] es1370: Remove unused indirection of PCIES1370State and ES1370State, Juan Quintela, 2009/08/24
[Qemu-devel] [PATCH 07/22] ne2000: Remove unneeded double indirection of PCINE2000State, Juan Quintela, 2009/08/24
[Qemu-devel] [PATCH 05/22] ne2000: remove casts from void *, Juan Quintela, 2009/08/24
[Qemu-devel] [PATCH 06/22] ne2000: pci_dev has this very value with the right type, Juan Quintela, 2009/08/24
[Qemu-devel] [PATCH 09/22] pci: remove casts from void *, Juan Quintela, 2009/08/24