From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGAiB-0003HO-W4 for qemu-devel@nongnu.org; Tue, 18 Oct 2011 10:32:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RGAiA-0001N1-MC for qemu-devel@nongnu.org; Tue, 18 Oct 2011 10:32:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RGAiA-0001Mb-CM for qemu-devel@nongnu.org; Tue, 18 Oct 2011 10:32:10 -0400 Message-ID: <4E9D8DE5.4090405@redhat.com> Date: Tue, 18 Oct 2011 16:32:05 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1318865312-27483-1-git-send-email-benoit.canet@gmail.com> <1318865312-27483-4-git-send-email-benoit.canet@gmail.com> <4E9D87F3.4010901@redhat.com> In-Reply-To: <4E9D87F3.4010901@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/7] integratorcp: convert control to memory API List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: =?UTF-8?B?QmVub8OudCBDYW5ldA==?= , qemu-devel@nongnu.org On 10/18/2011 04:06 PM, Avi Kivity wrote: > > I didn't spot this the first time round, but this is wrong. > > We shouldn't be g_malloc0()ing the MemoryRegion -- it should > > be an element in some suitable device struct. > > > > I think the right thing to do here is probably first to do the > > (fairly trivial) conversion of the icp_control code to be a > > sysbus device, then do the memory region conversion on top of that. > > It's not any less wrong than the original code, which also leaked > memory. I'll merge it and let any further conversion take place on top. I meant, it's not any more wrong than the original code, though my original statement is also correct. -- error compiling committee.c: too many arguments to function