[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH for-4.0 1/5] virt: Eliminate separate instance_ini
From: |
Peter Maydell |
Subject: |
Re: [Qemu-ppc] [PATCH for-4.0 1/5] virt: Eliminate separate instance_init functions |
Date: |
Thu, 6 Dec 2018 14:06:46 +0000 |
On Wed, 5 Dec 2018 at 20:58, Eduardo Habkost <address@hidden> wrote:
>
> All instance_init functions for all virt machine-types run
> exactly the same code, so we don't need separate functions. We
> only need to set instance_init for TYPE_VIRT_MACHINE.
>
> Signed-off-by: Eduardo Habkost <address@hidden>
> ---
> hw/arm/virt.c | 87 +++++++++++++--------------------------------------
> 1 file changed, 21 insertions(+), 66 deletions(-)
>
> +static const TypeInfo virt_machine_info = {
> + .name = TYPE_VIRT_MACHINE,
> + .parent = TYPE_MACHINE,
> + .abstract = true,
> + .instance_size = sizeof(VirtMachineState),
> + .class_size = sizeof(VirtMachineClass),
> + .class_init = virt_machine_class_init,
> + .instance_init = virt_instance_init,
Indentation looks like it's not quite right here.
> + .interfaces = (InterfaceInfo[]) {
> + { TYPE_HOTPLUG_HANDLER },
> + { }
> + },
> +};
Otherwise
Reviewed-by: Peter Maydell <address@hidden>
thanks
-- PMM
- [Qemu-ppc] [PATCH for-4.0 0/5] spapr/virt/pc: Eliminate custom instance_init functions, Eduardo Habkost, 2018/12/05
- [Qemu-ppc] [PATCH for-4.0 1/5] virt: Eliminate separate instance_init functions, Eduardo Habkost, 2018/12/05
- Re: [Qemu-ppc] [PATCH for-4.0 1/5] virt: Eliminate separate instance_init functions,
Peter Maydell <=
- [Qemu-ppc] [PATCH for-4.0 2/5] spapr: Use default_machine_opts to set use_hotplug_event_source, Eduardo Habkost, 2018/12/05
- [Qemu-ppc] [PATCH for-4.0 3/5] spapr: Use default_machine_opts to set suppress_vmdesc, Eduardo Habkost, 2018/12/05
- [Qemu-ppc] [PATCH for-4.0 5/5] pc: Use default_machine_opts to set suppress_vmdesc, Eduardo Habkost, 2018/12/05
- [Qemu-ppc] [PATCH for-4.0 4/5] spapr: Delete instance_options functions, Eduardo Habkost, 2018/12/05