From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Subject: [Qemu-devel] [PULL 6/8] xen-hvm: Constify string
Date: Thu, 28 Aug 2014 16:13:23 +0200 [thread overview]
Message-ID: <1409235205-21376-7-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1409235205-21376-1-git-send-email-pbonzini@redhat.com>
From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
It's constant, and sourced from existing const strings. Avoid dodgy
casts by converting to const.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
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);
--
1.8.3.1
next prev parent reply other threads:[~2014-08-28 14:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-28 14:13 [Qemu-devel] [PULL 0/8] SCSI and memory changes for 2014-08-28 Paolo Bonzini
2014-08-28 14:13 ` [Qemu-devel] [PULL 1/8] block: Pass errp in blkconf_geometry Paolo Bonzini
2014-08-28 14:13 ` [Qemu-devel] [PULL 2/8] scsi-bus: Convert DeviceClass init to realize Paolo Bonzini
2014-08-28 14:13 ` [Qemu-devel] [PULL 3/8] block/iscsi: fix memory corruption on iscsi resize Paolo Bonzini
2014-08-28 14:13 ` [Qemu-devel] [PULL 4/8] scsi-generic: remove superfluous DPRINTF avoid to break compiling Paolo Bonzini
2014-08-28 14:13 ` [Qemu-devel] [PULL 5/8] virtio-scsi: Report error if num_queues is 0 or too large Paolo Bonzini
2014-08-28 14:13 ` Paolo Bonzini [this message]
2014-08-28 14:13 ` [Qemu-devel] [PULL 7/8] xen: hvm: Abstract away memory region name ref Paolo Bonzini
2014-08-28 14:13 ` [Qemu-devel] [PULL 8/8] memory: Lazy init name from QOM name as needed Paolo Bonzini
2014-08-28 16:56 ` [Qemu-devel] [PULL 0/8] SCSI and memory changes for 2014-08-28 Peter Maydell
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=1409235205-21376-7-git-send-email-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=peter.crosthwaite@xilinx.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).