qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 06/17] memory: remove memory_region_destructor_rom_de


From: Paolo Bonzini
Subject: [Qemu-devel] [PULL 06/17] memory: remove memory_region_destructor_rom_device
Date: Thu, 15 Sep 2016 16:21:45 +0200

It is equivalent to memory_region_destructor_ram, use that one.

Reviewed-by: Igor Mammedov <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
 memory.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/memory.c b/memory.c
index 0eb6895..1a1baf5 100644
--- a/memory.c
+++ b/memory.c
@@ -944,11 +944,6 @@ static void memory_region_destructor_ram(MemoryRegion *mr)
     qemu_ram_free(mr->ram_block);
 }
 
-static void memory_region_destructor_rom_device(MemoryRegion *mr)
-{
-    qemu_ram_free(mr->ram_block);
-}
-
 static bool memory_region_need_escape(char c)
 {
     return c == '/' || c == '[' || c == '\\' || c == ']';
@@ -1405,7 +1400,7 @@ void memory_region_init_rom_device(MemoryRegion *mr,
     mr->opaque = opaque;
     mr->terminates = true;
     mr->rom_device = true;
-    mr->destructor = memory_region_destructor_rom_device;
+    mr->destructor = memory_region_destructor_ram;
     mr->ram_block = qemu_ram_alloc(size, mr, errp);
 }
 
-- 
1.8.3.1





reply via email to

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