From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XM9S4-0004B1-Kl for qemu-devel@nongnu.org; Tue, 26 Aug 2014 01:37:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XM9Ry-0003ZH-BI for qemu-devel@nongnu.org; Tue, 26 Aug 2014 01:37:52 -0400 Received: from smtp.mail.uni-mannheim.de ([134.155.96.80]:36938) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XM9Ry-0003Z0-4x for qemu-devel@nongnu.org; Tue, 26 Aug 2014 01:37:46 -0400 Message-ID: <53FC1D26.8040503@weilnetz.de> Date: Tue, 26 Aug 2014 07:37:42 +0200 From: Stefan Weil MIME-Version: 1.0 References: <200bdd50d5892cb0f1acaa19a9cdbd78fa6847da.1409018983.git.peter.crosthwaite@xilinx.com> In-Reply-To: <200bdd50d5892cb0f1acaa19a9cdbd78fa6847da.1409018983.git.peter.crosthwaite@xilinx.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH memory v2 1/3] xen-hvm: Constify string List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite , qemu-devel@nongnu.org Cc: pbonzini@redhat.com, stefano.stabellini@eu.citrix.com, peter.maydell@linaro.org Am 26.08.2014 um 05:09 schrieb Peter Crosthwaite: > It's constant, and sourced from existing const strings. Avoid dodgy > casts by converting to const. > > Signed-off-by: Peter Crosthwaite > --- > > xen-hvm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/xen-hvm.c b/xen-hvm.c > index 91de2e2..d763e86 100644 > --- a/xen-hvm.c > +++ b/xen-hvm.c > @@ -71,7 +71,7 @@ static inline ioreq_t *xen_vcpu_ioreq(shared_iopage_t *shared_page, int vcpu) > typedef struct XenPhysmap { > hwaddr start_addr; > ram_addr_t size; > - char *name; > + const char *name; > hwaddr phys_offset; > > QLIST_ENTRY(XenPhysmap) list; > @@ -330,7 +330,7 @@ go_physmap: > > physmap->start_addr = start_addr; > physmap->size = size; > - physmap->name = (char *)mr->name; > + physmap->name = mr->name; > physmap->phys_offset = phys_offset; > > QLIST_INSERT_HEAD(&state->physmap, physmap, list); > Thanks. Reviewed-by: Stefan Weil