All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Stefan Weil <sw@weilnetz.de>,
	Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH bugfix v1 1/3] xen: hvm: Abstract away memory region name ref (fix broken build)
Date: Thu, 21 Aug 2014 20:27:07 +0100	[thread overview]
Message-ID: <alpine.DEB.2.02.1408212022531.8032@kaball.uk.xensource.com> (raw)
In-Reply-To: <CAFEAcA-96jZECRpfUhj+mq=xa_9OQv4jVZivTZkTg1HsYRMiBg@mail.gmail.com>

On Wed, 20 Aug 2014, Peter Maydell wrote:
> On 20 August 2014 09:53, Stefan Weil <sw@weilnetz.de> wrote:
> > Am 20.08.2014 um 07:07 schrieb Peter Crosthwaite:
> >> The mr->name field is removed. This slipped through compile testing.
> >> Fix.
> >>
> >> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> >> ---
> >>
> >>  xen-hvm.c | 9 ++++++---
> >>  1 file changed, 6 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/xen-hvm.c b/xen-hvm.c
> >> index 91de2e2..9fd9d6e 100644
> >> --- a/xen-hvm.c
> >> +++ b/xen-hvm.c
> >> @@ -291,6 +291,7 @@ static int xen_add_to_physmap(XenIOState *state,
> >>      hwaddr pfn, start_gpfn;
> >>      hwaddr phys_offset = memory_region_get_ram_addr(mr);
> >>      char path[80], value[17];
> >> +    const char *mr_name;
> >>
> >>      if (get_physmapping(state, start_addr, size)) {
> >>          return 0;
> >> @@ -326,11 +327,13 @@ go_physmap:
> >>          }
> >>      }
> >>
> >> +    mr_name = memory_region_name(mr);
> >> +
> >>      physmap = g_malloc(sizeof (XenPhysmap));
> >>
> >>      physmap->start_addr = start_addr;
> >>      physmap->size = size;
> >> -    physmap->name = (char *)mr->name;
> >> +    physmap->name = (char *)mr_name;
> >
> > This type cast can be removed. Just add the const in XenPhysmap's name
> > declaration.
> 
> Yes, I noticed that dodgy cast too. Stefano, is there
> a reason why the XenPhysmap field isn't just a
> const pointer?
 
No reason, we could just switch to const char*. I would be happy to take
a patch for that.

Sorry for the late reply, I am attending XenSummit/LinuxCon.

  reply	other threads:[~2014-08-21 19:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20  5:06 [Qemu-devel] [PATCH bugfix v1 0/3] Fix Memory Region Name bugs Peter Crosthwaite
2014-08-20  5:07 ` [Qemu-devel] [PATCH bugfix v1 1/3] xen: hvm: Abstract away memory region name ref Peter Crosthwaite
2014-08-20  8:53   ` [Qemu-devel] [PATCH bugfix v1 1/3] xen: hvm: Abstract away memory region name ref (fix broken build) Stefan Weil
2014-08-20  8:55     ` Peter Maydell
2014-08-21 19:27       ` Stefano Stabellini [this message]
2014-08-20  5:07 ` [Qemu-devel] [PATCH bugfix v1 2/3] qom: return const for object_get_canon_path component Peter Crosthwaite
2014-08-20  5:08 ` [Qemu-devel] [PATCH bugfix v1 3/3] qom: object.h: Update object_get_canon_path* doc Peter Crosthwaite
2014-08-20  9:07   ` Peter Maydell
2014-08-20 14:54     ` Peter Crosthwaite
2014-08-20 15:58     ` Paolo Bonzini
2014-08-21  3:10       ` Peter Crosthwaite

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.02.1408212022531.8032@kaball.uk.xensource.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.