From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T32V4-0004e1-80 for qemu-devel@nongnu.org; Sun, 19 Aug 2012 06:12:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T32V3-0003Sd-Ai for qemu-devel@nongnu.org; Sun, 19 Aug 2012 06:12:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T32V3-0003SZ-2P for qemu-devel@nongnu.org; Sun, 19 Aug 2012 06:12:53 -0400 Message-ID: <5030BC1D.90801@redhat.com> Date: Sun, 19 Aug 2012 13:12:45 +0300 From: Avi Kivity MIME-Version: 1.0 References: <502A2D26.4060702@redhat.com> <502CBC26.9030705@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 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: liu ping fan Cc: Peter Maydell , qemu-devel@nongnu.org, Anthony Liguori On 08/17/2012 10:41 AM, liu ping fan wrote: >> The same example, in setup_cmd646_bar(PCIIDEState *d, int bus_num), I >> think we can not decide which is the type for @bar. If using >> object_dynamic_cast(@bar, TYPE_OBJECT) to tell whether it is Object or >> not, it will raise exception. >> > 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? -- error compiling committee.c: too many arguments to function