From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35846) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T33nt-0004SU-0Q for qemu-devel@nongnu.org; Sun, 19 Aug 2012 07:36:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T33ns-0006yN-0n for qemu-devel@nongnu.org; Sun, 19 Aug 2012 07:36:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49861) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T33nr-0006yF-PB for qemu-devel@nongnu.org; Sun, 19 Aug 2012 07:36:23 -0400 Message-ID: <5030CFB1.7010704@redhat.com> Date: Sun, 19 Aug 2012 14:36:17 +0300 From: Avi Kivity MIME-Version: 1.0 References: <502A2D26.4060702@redhat.com> <502CBC26.9030705@redhat.com> <5030BC1D.90801@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] memory: could we add extra input param for memory_region_init_io()? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: liu ping fan , Anthony Liguori , qemu-devel@nongnu.org On 08/19/2012 02:23 PM, Peter Maydell wrote: > On 19 August 2012 11:12, Avi Kivity wrote: >> On 08/17/2012 10:41 AM, liu ping fan wrote: >>> And something like omap_mpu_timer_init() in file hw/omap1.c , the >>> opaque(omap_mpu_timer_s) is got from g_malloc0, which makes things >>> even harder to handle. And the DO_CAST can not work for such issue. >> >> IMO omap_mpu_timer_s should be a DeviceState. Peter? > > Ideally, yes, but qemu is full of devices that haven't yet made the leap > to QOM. > > omap1 is particularly tricky because I don't actually have any test images > for it, so refactoring it is a leap in the dark. [I've tried asking on this list > if anybody had test images a couple of times without success.] Okay. Most of the options in this thread don't involve wholesale conversion of the opaque parameter in memory_region_init_io() to type Object *, so it's not necessary to convert everything. -- error compiling committee.c: too many arguments to function