qemu-ppc
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]