All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: herongguang.he@huawei.com
Subject: [Qemu-devel] [PATCH] memory: remove memory_region_destructor_rom_device
Date: Wed, 14 Sep 2016 11:06:34 +0200	[thread overview]
Message-ID: <1473843994-16004-1-git-send-email-pbonzini@redhat.com> (raw)

It is equivalent to memory_region_destructor_ram, use that one.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 memory.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/memory.c b/memory.c
index 0eb6895..5ed3872 100644
--- a/memory.c
+++ b/memory.c
@@ -943,10 +943,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)
@@ -1405,7 +1401,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);
 }
 
-- 
2.7.4

             reply	other threads:[~2016-09-14  9:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-14  9:06 Paolo Bonzini [this message]
2016-09-14 10:08 ` [Qemu-devel] [PATCH] memory: remove memory_region_destructor_rom_device Igor Mammedov
2016-09-14 10:15 ` no-reply
2016-09-14 10:27 ` Fam Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1473843994-16004-1-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=herongguang.he@huawei.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.