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: Hu Tao
Subject: Re: [Qemu-devel] [PATCH 25/26] isa bus: use realize for isa bus
Date: Mon, 1 Jul 2013 13:30:15 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Jun 30, 2013 at 04:57:03PM +0200, Andreas Färber wrote:
> 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. ;)

Noticed that. :)

> 
> 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.

So don't have to CC people in MAINTAINERS? For example:

  ./scripts/get_maintainer.pl --nogit-fallback patch-01

get:

  Gerd Hoffmann <address@hidden> (maintainer:USB)

and Gerd Hoffmann is in MAINTAINERS, there is no need to CC him in
patch-01? If so I'll update my script.

> 
> > 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.

There are many other devices using init, so simply drop it now won't
compile. One of the goals is to remove the init after all devices are
converted from init to realize.

> 
> 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]