The subject is a bit misleading, suggest:
"isa-bus: Use QOM realize for ISA SysBus bridge"

Am 22.06.2013 10:50, schrieb Hu Tao:
> Cc: "Andreas Färber" <afaer...@suse.de>
> Cc: Paolo Bonzini <pbonz...@redhat.com>
> Cc: Anthony Liguori <aligu...@us.ibm.com>

> Cc: Avi Kivity <a...@redhat.com>

This will bounce, please drop. ;)

Also, if you use git-send-email together with
"scripts/get_maintainer.pl --nogit-fallback" you only need to add any
CCs missing in MAINTAINERS file per commit.

> Cc: Jim Meyering <meyer...@redhat.com>
> Signed-off-by: Hu Tao <hu...@cn.fujitsu.com>
> ---
>  hw/isa/isa-bus.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
> index 136d17e..287f941 100644
> --- a/hw/isa/isa-bus.c
> +++ b/hw/isa/isa-bus.c
> @@ -192,18 +192,17 @@ static void isabus_dev_print(Monitor *mon, DeviceState 
> *dev, int indent)
>      }
>  }
>  
> -static int isabus_bridge_init(SysBusDevice *dev)
> +static void isabus_bridge_realize(DeviceState *dev, Error **errp)
>  {
>      /* nothing */
> -    return 0;
> +    return;

Not needed.

>  }
>  
>  static void isabus_bridge_class_init(ObjectClass *klass, void *data)
>  {
>      DeviceClass *dc = DEVICE_CLASS(klass);
> -    SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass);
>  
> -    k->init = isabus_bridge_init;
> +    dc->realize = isabus_bridge_realize;
>      dc->fw_name = "isa";
>      dc->no_user = 1;
>  }

I would propose to simply drop the init function instead of turning it
into a realize function unless you see a future use case for it.

Historically it was not possible to omit a SysBusDevice init function:
http://git.qemu.org/?p=qemu.git;a=commit;h=4ce5dae88ecf2bafa0cd663de7e923728b1b3672

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

Reply via email to