From 469b046ead0671932ff3af8d6f95045b19b186ef Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 11 Jun 2014 12:50:43 +0200 Subject: memory: remove memory_region_destroy The function is empty after the previous patch, so remove it. Reviewed-by: Peter Crosthwaite Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'include/exec/memory.h') diff --git a/include/exec/memory.h b/include/exec/memory.h index e2c8e3e0a6..5bd10d13f5 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -429,15 +429,6 @@ void memory_region_init_iommu(MemoryRegion *mr, const char *name, uint64_t size); -/** - * memory_region_destroy: Destroy a memory region and reclaim all resources. - * - * @mr: the region to be destroyed. May not currently be a subregion - * (see memory_region_add_subregion()) or referenced in an alias - * (see memory_region_init_alias()). - */ -void memory_region_destroy(MemoryRegion *mr); - /** * memory_region_owner: get a memory region's owner. * -- cgit v1.2.1 From 5d546d4b65a3751172286e299528de15c5f05576 Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Thu, 14 Aug 2014 23:55:03 -0700 Subject: 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 --- include/exec/memory.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/exec/memory.h') diff --git a/include/exec/memory.h b/include/exec/memory.h index 5bd10d13f5..d165b278cb 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 -- cgit v1.2.1 From b0225c2c0d89200a29dc3d0b59d2e87a79cbaeb8 Mon Sep 17 00:00:00 2001 From: Peter Crosthwaite Date: Thu, 14 Aug 2014 23:56:08 -0700 Subject: memory: Use canonical path component as the name Rather than having the name as separate state. This prepares support for creating a MemoryRegion dynamically (i.e. without memory_region_init() and friends) and the MemoryRegion still getting a usable name. Signed-off-by: Peter Crosthwaite Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/exec/memory.h') diff --git a/include/exec/memory.h b/include/exec/memory.h index d165b278cb..10f73d9e4a 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -162,7 +162,6 @@ struct MemoryRegion { QTAILQ_HEAD(subregions, MemoryRegion) subregions; QTAILQ_ENTRY(MemoryRegion) subregions_link; QTAILQ_HEAD(coalesced_ranges, CoalescedMemoryRange) coalesced; - const char *name; uint8_t dirty_log_mask; unsigned ioeventfd_nb; MemoryRegionIoeventfd *ioeventfds; -- cgit v1.2.1