From patchwork Mon Aug 24 16:42:51 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 31983 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 334D5B7B5C for ; Tue, 25 Aug 2009 03:35:39 +1000 (EST) Received: from localhost ([127.0.0.1]:48457 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfdSC-0004gp-4a for incoming@patchwork.ozlabs.org; Mon, 24 Aug 2009 13:35:36 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mfcg1-0001Bo-JJ for qemu-devel@nongnu.org; Mon, 24 Aug 2009 12:45:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mfcfx-000160-5H for qemu-devel@nongnu.org; Mon, 24 Aug 2009 12:45:49 -0400 Received: from [199.232.76.173] (port=33822 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mfcfw-00015I-Aa for qemu-devel@nongnu.org; Mon, 24 Aug 2009 12:45:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23286) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mfcfv-00036P-JJ for qemu-devel@nongnu.org; Mon, 24 Aug 2009 12:45:44 -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 n7OGjgtx022415 for ; Mon, 24 Aug 2009 12:45:42 -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 n7OGjKU9024317; Mon, 24 Aug 2009 12:45:41 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Mon, 24 Aug 2009 18:42:51 +0200 Message-Id: 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 17/26] ne2000: Change casts to DO_UPCAST() for PCINE2000State 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/ne2000.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ne2000.c b/hw/ne2000.c index 070afcc..e5d8914 100644 --- a/hw/ne2000.c +++ b/hw/ne2000.c @@ -779,7 +779,7 @@ typedef struct PCINE2000State { static void ne2000_map(PCIDevice *pci_dev, int region_num, uint32_t addr, uint32_t size, int type) { - PCINE2000State *d = (PCINE2000State *)pci_dev; + PCINE2000State *d = DO_UPCAST(PCINE2000State, dev, pci_dev); NE2000State *s = &d->ne2000; register_ioport_write(addr, 16, 1, ne2000_ioport_write, s); @@ -805,7 +805,7 @@ static void ne2000_cleanup(VLANClientState *vc) static void pci_ne2000_init(PCIDevice *pci_dev) { - PCINE2000State *d = (PCINE2000State *)pci_dev; + PCINE2000State *d = DO_UPCAST(PCINE2000State, dev, pci_dev); NE2000State *s; uint8_t *pci_conf;