From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NGBuY-0003Yu-6w for qemu-devel@nongnu.org; Thu, 03 Dec 2009 08:39:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NGBuS-0003RE-01 for qemu-devel@nongnu.org; Thu, 03 Dec 2009 08:39:56 -0500 Received: from [199.232.76.173] (port=42176 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NGBuR-0003Qs-QS for qemu-devel@nongnu.org; Thu, 03 Dec 2009 08:39:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51113) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NGBuR-0006X4-Au for qemu-devel@nongnu.org; Thu, 03 Dec 2009 08:39:51 -0500 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 nB3DdoUP016615 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 3 Dec 2009 08:39:50 -0500 Message-ID: <4B17BFA4.6000103@redhat.com> Date: Thu, 03 Dec 2009 15:39:48 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [PATCH 06/41] virtio: Use DO_UPCAST instead of a cast References: <20091202134153.GC18193@redhat.com> <20091202181911.GB3949@redhat.com> <20091202184410.GC3984@redhat.com> <20091203094836.GA6752@redhat.com> <20091203120441.GD7352@redhat.com> 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, "Michael S. Tsirkin" On 12/03/2009 02:55 PM, Juan Quintela wrote: > sorry, already allocated memory. basically -device foo > requires that qdev creates foo and then it call foo_init(). > Alternatives: - foo_init() allocates Foo and calls qdev_init() (how C++ works, but cumbersome here) - we put the offset of DeviceState as well as the size into DeviceInfo (a macro can help) I agree the hidden assumptions about member placement are bad. -- error compiling committee.c: too many arguments to function