From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsCo0-0006cY-En for qemu-devel@nongnu.org; Mon, 07 Jan 2013 08:32:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsCOP-0007l9-5n for qemu-devel@nongnu.org; Mon, 07 Jan 2013 08:06:00 -0500 Received: from cantor2.suse.de ([195.135.220.15]:59954 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsCOO-0007kx-QA for qemu-devel@nongnu.org; Mon, 07 Jan 2013 08:05:29 -0500 Message-ID: <50EAC810.2060201@suse.de> Date: Mon, 07 Jan 2013 14:05:20 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1357560425-15950-1-git-send-email-alexander_barabash@mentor.com> In-Reply-To: <1357560425-15950-1-git-send-email-alexander_barabash@mentor.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/1] Added address_space_init2(). List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Barabash Cc: qemu-devel@nongnu.org A "memory: " prefix in the subject would've been nice for filtering. Am 07.01.2013 13:07, schrieb Alexander Barabash: > address_space_init2: initializes a named address space. What for? There are no users in this patch that justify its utility over setting the field manually. The name is really awful, maybe ..._init_with_name or add a name argument to the existing function and let the existing callers pass NULL? Regards, Andreas >=20 > Signed-off-by: Alexander Barabash > --- > include/exec/memory.h | 9 +++++++++ > memory.c | 6 ++++++ > 2 files changed, 15 insertions(+) >=20 > diff --git a/include/exec/memory.h b/include/exec/memory.h > index 2322732..8f8a31d 100644 > --- a/include/exec/memory.h > +++ b/include/exec/memory.h > @@ -820,6 +820,15 @@ void mtree_info(fprintf_function mon_printf, void = *f); > */ > void address_space_init(AddressSpace *as, MemoryRegion *root); > =20 > +/** > + * address_space_init2: initializes a named address space > + * > + * @as: an uninitialized #AddressSpace > + * @root: a #MemoryRegion that routes addesses for the address space > + * @name: used for debugging > + */ > +void address_space_init2(AddressSpace *as, MemoryRegion *root, > + const char *name); > =20 > /** > * address_space_destroy: destroy an address space > diff --git a/memory.c b/memory.c > index 410c5f8..1652c10 100644 > --- a/memory.c > +++ b/memory.c > @@ -1574,6 +1574,12 @@ void address_space_init(AddressSpace *as, Memory= Region *root) > address_space_init_dispatch(as); > } > =20 > +void address_space_init2(AddressSpace *as, MemoryRegion *root, const c= har *name) > +{ > + address_space_init(as, root); > + as->name =3D g_strdup(name); > +} > + > void address_space_destroy(AddressSpace *as) > { > /* Flush out anything from MemoryListeners listening in on this */ --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg