From fa53a0e53efdc7002497ea4a76aacf6cceb170ef Mon Sep 17 00:00:00 2001 From: Gonglei Date: Tue, 10 May 2016 10:04:59 +0800 Subject: 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 Reviewed-by: Fam Zheng Message-Id: <1462845901-89716-2-git-send-email-arei.gonglei@huawei.com> Signed-off-by: Paolo Bonzini --- migration/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'migration/ram.c') diff --git a/migration/ram.c b/migration/ram.c index 5e88080faf..6b6900e4c1 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -2478,7 +2478,7 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id) if (length != block->used_length) { Error *local_err = NULL; - ret = qemu_ram_resize(block->offset, length, + ret = qemu_ram_resize(block, length, &local_err); if (local_err) { error_report_err(local_err); -- cgit v1.2.3