From: Peter Crosthwaite Date: Fri, 15 Aug 2014 06:55:03 +0000 (-0700) Subject: memory: constify memory_region_name X-Git-Tag: v2.2.0-rc0~169^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5d546d4b65a3751172286e299528de15c5f05576;p=thirdparty%2Fqemu.git memory: constify memory_region_name It doesn't change the MR and some prospective call sites will have const MRs at hand. Signed-off-by: Peter Crosthwaite Signed-off-by: Paolo Bonzini --- diff --git a/include/exec/memory.h b/include/exec/memory.h index 5bd10d13f51..d165b278cb4 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 f11c035f0e9..1cde6ff6608 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; }