From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJgtL-0004rF-2V for qemu-devel@nongnu.org; Tue, 19 Aug 2014 06:43:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJgtF-0004ax-Rw for qemu-devel@nongnu.org; Tue, 19 Aug 2014 06:43:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46663) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJgtF-0004at-Kw for qemu-devel@nongnu.org; Tue, 19 Aug 2014 06:43:45 -0400 From: Paolo Bonzini Date: Tue, 19 Aug 2014 12:43:00 +0200 Message-Id: <1408444983-21464-18-git-send-email-pbonzini@redhat.com> In-Reply-To: <1408444983-21464-1-git-send-email-pbonzini@redhat.com> References: <1408444983-21464-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 17/20] memory: constify memory_region_name List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Crosthwaite From: Peter Crosthwaite 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 --- 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