aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2016-03-01 14:18:19 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2016-03-07 13:18:28 +0100
commit0a75601853c00f3729fa62c49ec0d4bb1e3d9bc1 (patch)
tree9bbc82f3283b969e716970d1403f212fe832bb97 /exec.c
parent528f46af6ecd1e300db18684969104d4067b867b (diff)
memory: Move assignment to ram_block to memory_region_init_*
We don't force "const" qualifiers with pointers in QEMU, but it's still good to keep a clean function interface. Assigning to mr->ram_block is in this sense ugly - one initializer mutating its owning object's state. Move it to memory_region_init_*, where mr->ram_addr is assigned. Reviewed-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Fam Zheng <famz@redhat.com> Message-Id: <1456813104-25902-3-git-send-email-famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index 2b14b7954e..83e3f7d31b 100644
--- a/exec.c
+++ b/exec.c
@@ -1711,7 +1711,6 @@ RAMBlock *qemu_ram_alloc_internal(ram_addr_t size, ram_addr_t max_size,
error_propagate(errp, local_err);
return NULL;
}
- mr->ram_block = new_block;
return new_block;
}