From patchwork Mon Aug 24 16:42:35 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 31961 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 CBF44B7B63 for ; Tue, 25 Aug 2009 03:03:42 +1000 (EST) Received: from localhost ([127.0.0.1]:55412 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfcxG-0006tT-Ab for incoming@patchwork.ozlabs.org; Mon, 24 Aug 2009 13:03:38 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mfcfi-0000jF-Ag for qemu-devel@nongnu.org; Mon, 24 Aug 2009 12:45:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mfcfd-0000br-Bw for qemu-devel@nongnu.org; Mon, 24 Aug 2009 12:45:29 -0400 Received: from [199.232.76.173] (port=33800 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mfcfc-0000bO-Oe for qemu-devel@nongnu.org; Mon, 24 Aug 2009 12:45:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46693) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mfcfc-00031r-0k for qemu-devel@nongnu.org; Mon, 24 Aug 2009 12:45:24 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7OGjNwR021457 for ; Mon, 24 Aug 2009 12:45:23 -0400 Received: from localhost.localdomain (vpn1-4-157.ams2.redhat.com [10.36.4.157]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7OGjKTr024317; Mon, 24 Aug 2009 12:45:22 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Mon, 24 Aug 2009 18:42:35 +0200 Message-Id: <821c8eaa35cede663b184630e81fdaa2dc75d0b4.1251131364.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH 01/26] 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 | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/eepro100.c b/hw/eepro100.c index ec31a6a..3c58ec1 100644 --- a/hw/eepro100.c +++ b/hw/eepro100.c @@ -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");