From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9cdc-00008c-87 for qemu-devel@nongnu.org; Thu, 17 Dec 2015 12:46:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9cda-0006hy-KP for qemu-devel@nongnu.org; Thu, 17 Dec 2015 12:46:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54447) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9cda-0006hg-EM for qemu-devel@nongnu.org; Thu, 17 Dec 2015 12:46:46 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 126F7693D8 for ; Thu, 17 Dec 2015 17:46:46 +0000 (UTC) From: Paolo Bonzini Date: Thu, 17 Dec 2015 18:45:58 +0100 Message-Id: <1450374401-31352-3-git-send-email-pbonzini@redhat.com> In-Reply-To: <1450374401-31352-1-git-send-email-pbonzini@redhat.com> References: <1450374401-31352-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 02/45] memory: Eliminate memory_region_destructor_ram_from_ptr() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eduardo Habkost From: Eduardo Habkost The function is equivalent to memory_region_destructor_ram(), so it's not needed anymore. Signed-off-by: Eduardo Habkost Message-Id: <1446844805-14492-3-git-send-email-ehabkost@redhat.com> Signed-off-by: Paolo Bonzini --- memory.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/memory.c b/memory.c index cf5b05f..af08cf1 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.5.0