On Mon, Jun 2, 2014 at 10:18 PM, Peter Maydell <peter.mayd...@linaro.org> wrote:
> On 2 June 2014 05:17, Peter Crosthwaite <peter.crosthwa...@xilinx.com> wrote:
>> QOMify memory regions as an Object. The former init() and destroy()
>> routines become instance_init() and instance_finalize() resp.
>>
>> memory_region_init() is re-implemented to be:
>> object_initialize() + set fields
>
>> +static void memory_region_initfn(Object *obj)
>> +{
>> +    MemoryRegion *mr = MEMORY_REGION(obj);
>> +
>> +    mr->ops = &unassigned_mem_ops;
>>      mr->enabled = true;
>> -    mr->terminates = false;
>> -    mr->ram = false;
>>      mr->romd_mode = true;
>> -    mr->readonly = false;
>> -    mr->rom_device = false;
>>      mr->destructor = memory_region_destructor_none;
>> -    mr->priority = 0;
>> -    mr->may_overlap = false;
>> -    mr->alias = NULL;
>>      QTAILQ_INIT(&mr->subregions);
>>      memset(&mr->subregions_link, 0, sizeof mr->subregions_link);
>
> We rely on QOM objects being zero-initialized for other
> fields, so why leave the explicit memset for this one?
>

It slipped through the cracks in my scan for 0s. Will Fix.

Regards,
Peter

> thanks
> -- PMM
>

Reply via email to