From patchwork Mon Aug 24 11:03:22 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 31900 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 39FC3B7B61 for ; Mon, 24 Aug 2009 21:10:10 +1000 (EST) Received: from localhost ([127.0.0.1]:40957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfXR8-0007ZM-QS for incoming@patchwork.ozlabs.org; Mon, 24 Aug 2009 07:10:06 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MfXNO-00061I-AT for qemu-devel@nongnu.org; Mon, 24 Aug 2009 07:06:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MfXNI-0005sm-TI for qemu-devel@nongnu.org; Mon, 24 Aug 2009 07:06:13 -0400 Received: from [199.232.76.173] (port=49177 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfXNI-0005sd-JV for qemu-devel@nongnu.org; Mon, 24 Aug 2009 07:06:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24744) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MfXNI-0006tF-2C for qemu-devel@nongnu.org; Mon, 24 Aug 2009 07:06:08 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7OB66U6031480 for ; Mon, 24 Aug 2009 07:06:06 -0400 Received: from localhost.localdomain (vpn2-8-191.ams2.redhat.com [10.36.8.191]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7OB63UN030007; Mon, 24 Aug 2009 07:06:05 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Mon, 24 Aug 2009 13:03:22 +0200 Message-Id: <23ebd22d4503824120a6fda0544518fae4a7f7b6.1251111439.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH 01/22] eepro100: convert casts to DO_UPCAST() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 @@ -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");