memory: drop find_ram_block()

On the one hand, we have already qemu_get_ram_block() whose function
is similar. On the other hand, we can directly use mr->ram_block but
searching RAMblock by ram_addr which is a kind of waste.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-Id: <1462845901-89716-2-git-send-email-arei.gonglei@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Gonglei
2016-05-23 16:53:44 +02:00
committed by Paolo Bonzini
parent e92a2d9cb3
commit fa53a0e53e
6 changed files with 14 additions and 34 deletions
+1 -1
View File
@@ -1673,7 +1673,7 @@ void memory_region_ram_resize(MemoryRegion *mr, ram_addr_t newsize, Error **errp
{
assert(mr->ram_block);
qemu_ram_resize(memory_region_get_ram_addr(mr), newsize, errp);
qemu_ram_resize(mr->ram_block, newsize, errp);
}
static void memory_region_update_coalesced_range_as(MemoryRegion *mr, AddressSpace *as)