qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 25/26] isa bus: use realize for isa bus


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 25/26] isa bus: use realize for isa bus
Date: Sun, 30 Jun 2013 16:57:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

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" <address@hidden>
> Cc: Paolo Bonzini <address@hidden>
> Cc: Anthony Liguori <address@hidden>

> Cc: Avi Kivity <address@hidden>

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 <address@hidden>
> Signed-off-by: Hu Tao <address@hidden>
> ---
>  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

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