qemu-devel
[Top][All Lists]
Advanced

[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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]