From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MfYua-0001NM-1t for qemu-devel@nongnu.org; Mon, 24 Aug 2009 08:44:36 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MfYuV-0001H7-37 for qemu-devel@nongnu.org; Mon, 24 Aug 2009 08:44:35 -0400 Received: from [199.232.76.173] (port=40839 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MfYuU-0001Ge-LW for qemu-devel@nongnu.org; Mon, 24 Aug 2009 08:44:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12957) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MfYuU-0007Tb-5W for qemu-devel@nongnu.org; Mon, 24 Aug 2009 08:44:30 -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 n7OCiTEe021052 for ; Mon, 24 Aug 2009 08:44:29 -0400 Message-ID: <4A928B2A.8060100@redhat.com> Date: Mon, 24 Aug 2009 14:44:26 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 15/22] lsi53c895a: LSIState is a PCIDevice is a DeviceHost References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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 > void lsi_scsi_attach(DeviceState *host, BlockDriverState *bd, int id) > { > - LSIState *s = (LSIState *)host; > + PCIDevice *d = DO_UPCAST(PCIDevice, qdev, host); > + LSIState *s = DO_UPCAST(LSIState, dev, d); LSIState *s = DO_UPCAST(LSIState, dev.qdev, host); cheers, Gerd