From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MfZ9g-0001fD-UJ for qemu-devel@nongnu.org; Mon, 24 Aug 2009 09:00:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MfZ9b-0001Z8-VU for qemu-devel@nongnu.org; Mon, 24 Aug 2009 09:00:12 -0400 Received: from [199.232.76.173] (port=51429 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfZ9b-0001Yn-GB for qemu-devel@nongnu.org; Mon, 24 Aug 2009 09:00:07 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:64349) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MfZ9a-0001fA-Ip for qemu-devel@nongnu.org; Mon, 24 Aug 2009 09:00:07 -0400 Message-ID: <4A928EC3.3060700@mail.berlios.de> Date: Mon, 24 Aug 2009 14:59:47 +0200 From: Stefan Weil MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 01/22] eepro100: convert casts to DO_UPCAST() References: <23ebd22d4503824120a6fda0544518fae4a7f7b6.1251111439.git.quintela@redhat.com> In-Reply-To: <23ebd22d4503824120a6fda0544518fae4a7f7b6.1251111439.git.quintela@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org Juan Quintela schrieb: > Signed-off-by: Juan Quintela > --- > 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 > Please don't change formatting of multiline comments like this. > @@ -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"); >