[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 17/20] memory: constify memory_region_name
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 17/20] memory: constify memory_region_name |
Date: |
Tue, 19 Aug 2014 12:43:00 +0200 |
From: Peter Crosthwaite <address@hidden>
It doesn't change the MR and some prospective call sites will have
const MRs at hand.
Signed-off-by: Peter Crosthwaite <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
include/exec/memory.h | 2 +-
memory.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 5bd10d1..d165b27 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -511,7 +511,7 @@ void memory_region_unregister_iommu_notifier(Notifier *n);
*
* @mr: the memory region being queried
*/
-const char *memory_region_name(MemoryRegion *mr);
+const char *memory_region_name(const MemoryRegion *mr);
/**
* memory_region_is_logging: return whether a memory region is logging writes
diff --git a/memory.c b/memory.c
index f11c035..1cde6ff 100644
--- a/memory.c
+++ b/memory.c
@@ -1308,7 +1308,7 @@ uint64_t memory_region_size(MemoryRegion *mr)
return int128_get64(mr->size);
}
-const char *memory_region_name(MemoryRegion *mr)
+const char *memory_region_name(const MemoryRegion *mr)
{
return mr->name;
}
--
1.8.3.1
- [Qemu-devel] [PULL 07/20] qom: object: move unparenting to the child property's release callback, (continued)
- [Qemu-devel] [PULL 07/20] qom: object: move unparenting to the child property's release callback, Paolo Bonzini, 2014/08/19
- [Qemu-devel] [PULL 08/20] sysbus: remove unused function sysbus_del_io, Paolo Bonzini, 2014/08/19
- [Qemu-devel] [PULL 09/20] vga: do not dynamically allocate chain4_alias, Paolo Bonzini, 2014/08/19
- [Qemu-devel] [PULL 10/20] nic: do not destroy memory regions in cleanup functions, Paolo Bonzini, 2014/08/19
- [Qemu-devel] [PULL 11/20] ioport: split deletion and destruction, Paolo Bonzini, 2014/08/19
- [Qemu-devel] [PULL 12/20] memory: convert memory_region_destroy to object_unparent, Paolo Bonzini, 2014/08/19
- [Qemu-devel] [PULL 13/20] memory: remove memory_region_destroy, Paolo Bonzini, 2014/08/19
- [Qemu-devel] [PULL 14/20] tpm_tis: remove instance_finalize callback, Paolo Bonzini, 2014/08/19
- [Qemu-devel] [PULL 15/20] loader: Abstract away ref to memory region names, Paolo Bonzini, 2014/08/19
- [Qemu-devel] [PULL 16/20] exec: Abstract away ref to memory region names, Paolo Bonzini, 2014/08/19
- [Qemu-devel] [PULL 17/20] memory: constify memory_region_name,
Paolo Bonzini <=
- [Qemu-devel] [PULL 18/20] memory: Use memory_region_name for name access, Paolo Bonzini, 2014/08/19
- [Qemu-devel] [PULL 19/20] memory: Use canonical path component as the name, Paolo Bonzini, 2014/08/19
[Qemu-devel] [PULL 20/20] mtree: remove write-only field, Paolo Bonzini, 2014/08/19
Re: [Qemu-devel] [PULL 00/20] SCSI and memory changes for 2014-08-18, Peter Maydell, 2014/08/19