From: Eduardo Habkost <ehabkost@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 2/2] memory: Eliminate memory_region_destructor_ram_from_ptr()
Date: Fri, 6 Nov 2015 19:20:05 -0200 [thread overview]
Message-ID: <1446844805-14492-3-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1446844805-14492-1-git-send-email-ehabkost@redhat.com>
The function is equivalent to memory_region_destructor_ram(), so
it's not needed anymore.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
memory.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/memory.c b/memory.c
index 183eca5..57d7d33 100644
--- a/memory.c
+++ b/memory.c
@@ -859,11 +859,6 @@ static void memory_region_destructor_ram(MemoryRegion *mr)
qemu_ram_free(mr->ram_addr);
}
-static void memory_region_destructor_ram_from_ptr(MemoryRegion *mr)
-{
- qemu_ram_free(mr->ram_addr);
-}
-
static void memory_region_destructor_rom_device(MemoryRegion *mr)
{
qemu_ram_free(mr->ram_addr & TARGET_PAGE_MASK);
@@ -1246,7 +1241,7 @@ void memory_region_init_ram_ptr(MemoryRegion *mr,
memory_region_init(mr, owner, name, size);
mr->ram = true;
mr->terminates = true;
- mr->destructor = memory_region_destructor_ram_from_ptr;
+ mr->destructor = memory_region_destructor_ram;
mr->dirty_log_mask = tcg_enabled() ? (1 << DIRTY_MEMORY_CODE) : 0;
/* qemu_ram_alloc_from_ptr cannot fail with ptr != NULL. */
--
2.1.0
next prev parent reply other threads:[~2015-11-06 21:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-06 21:20 [Qemu-devel] [PATCH 0/2] memory: Eliminate qemu_ram_free_from_ptr() & memory_region_destructor_ram_from_ptr() Eduardo Habkost
2015-11-06 21:20 ` [Qemu-devel] [PATCH 1/2] exec: Eliminate qemu_ram_free_from_ptr() Eduardo Habkost
2015-11-06 21:20 ` Eduardo Habkost [this message]
2015-11-09 9:43 ` [Qemu-devel] [PATCH 0/2] memory: Eliminate qemu_ram_free_from_ptr() & memory_region_destructor_ram_from_ptr() Paolo Bonzini
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=1446844805-14492-3-git-send-email-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=pbonzini@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).