void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms,
- const uint64_t *legacy_align, Error **errp)
+ Error **errp)
{
const MemoryDeviceClass *mdc = MEMORY_DEVICE_GET_CLASS(md);
Error *local_err = NULL;
@@ -388,14 +388,10 @@ void memory_device_pre_plug(MemoryDeviceState *md, MachineState *ms,
return;
}
- if (legacy_align) {
- align = *legacy_align;
- } else {
- if (mdc->get_min_alignment) {
- align = mdc->get_min_alignment(md);
- }
- align = MAX(align, memory_region_get_alignment(mr));
+ if (mdc->get_min_alignment) {
+ align = mdc->get_min_alignment(md);
}
+ align = MAX(align, memory_region_get_alignment(mr));
addr = mdc->get_addr(md);
addr = memory_device_get_free_addr(ms, !addr ? NULL : &addr, align,
memory_region_size(mr), &local_err);
Very nice!
Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>
--
Cheers,
David / dhildenb
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx