Received: from eggs.gnu.org ([2001:4830:134:3::10]:48195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vp0pk-00081m-Lz for qemu-devel@nongnu.org; Fri, 06 Dec 2013 14:13:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vp0pf-00053o-D1 for qemu-devel@nongnu.org; Fri, 06 Dec 2013 14:13:04 -0500 Message-ID: <52A221B9.4040407@msgid.tls.msk.ru> Date: Fri, 06 Dec 2013 23:12:57 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <1386355410-10805-1-git-send-email-sw@weilnetz.de> In-Reply-To: <1386355410-10805-1-git-send-email-sw@weilnetz.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] hw/arm/highbank: Simplify code (memory region in device state) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: qemu-trivial@nongnu.org, Peter Maydell , qemu-devel , Mark Langsdorf 06.12.2013 22:43, Stefan Weil wrote: > The memory region can be included by value instead of by reference in the > device state (like it is done in other SoCs). > > Signed-off-by: Stefan Weil > --- > hw/arm/highbank.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c > index fe98ef1..54384b3 100644 > --- a/hw/arm/highbank.c > +++ b/hw/arm/highbank.c > @@ -125,7 +125,7 @@ typedef struct { > SysBusDevice parent_obj; > /*< public >*/ > > - MemoryRegion *iomem; > + MemoryRegion iomem; > uint32_t regs[NUM_REGS]; > } HighbankRegsState; Don't we have active maintainer for arm? (Who is Cc'd on the original patch). > @@ -154,10 +154,9 @@ static int highbank_regs_init(SysBusDevice *dev) > { > HighbankRegsState *s = HIGHBANK_REGISTERS(dev); > > - s->iomem = g_new(MemoryRegion, 1); > - memory_region_init_io(s->iomem, OBJECT(s), &hb_mem_ops, s->regs, > + memory_region_init_io(&s->iomem, OBJECT(s), &hb_mem_ops, s->regs, > "highbank_regs", 0x1000); I know right to nothing about arm, does it have any alignment requiriments, which may break here? Thanks, /mjt