diff mbox

[memory,v1,3/5] memory: constify memory_region_name

Message ID 8ab31b8b2d997bb52eb38cda68ad3124c9e3f7ef.1408085402.git.peter.crosthwaite@xilinx.com
State New
Headers show

Commit Message

Peter Crosthwaite Aug. 15, 2014, 6:55 a.m. UTC
It doesn't change the MR and some prospective call sites will have
const MRs at hand.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
---

 include/exec/memory.h | 2 +-
 memory.c              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/include/exec/memory.h b/include/exec/memory.h
index e2c8e3e..081f85b 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -520,7 +520,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 64d7176..8d88cc4 100644
--- a/memory.c
+++ b/memory.c
@@ -1314,7 +1314,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;
 }