From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtJ3u-0005m1-Rj for qemu-devel@nongnu.org; Sun, 30 Jun 2013 10:57:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UtJ3t-0003h7-QW for qemu-devel@nongnu.org; Sun, 30 Jun 2013 10:57:10 -0400 Received: from cantor2.suse.de ([195.135.220.15]:51455 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtJ3t-0003h0-Hw for qemu-devel@nongnu.org; Sun, 30 Jun 2013 10:57:09 -0400 Message-ID: <51D0473F.9060807@suse.de> Date: Sun, 30 Jun 2013 16:57:03 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <8be2a07871a424a87790814a23d3b2c13a67724c.1371804804.git.hutao@cn.fujitsu.com> In-Reply-To: <8be2a07871a424a87790814a23d3b2c13a67724c.1371804804.git.hutao@cn.fujitsu.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 25/26] isa bus: use realize for isa bus List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hu Tao Cc: Jim Meyering , Paolo Bonzini , Peter Crosthwaite , qemu-devel , Anthony Liguori 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=C3=A4rber" > Cc: Paolo Bonzini > Cc: Anthony Liguori > Cc: Avi Kivity 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 > Signed-off-by: Hu Tao > --- > hw/isa/isa-bus.c | 7 +++---- > 1 file changed, 3 insertions(+), 4 deletions(-) >=20 > 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, Device= State *dev, int indent) > } > } > =20 > -static int isabus_bridge_init(SysBusDevice *dev) > +static void isabus_bridge_realize(DeviceState *dev, Error **errp) > { > /* nothing */ > - return 0; > + return; Not needed. > } > =20 > static void isabus_bridge_class_init(ObjectClass *klass, void *data) > { > DeviceClass *dc =3D DEVICE_CLASS(klass); > - SysBusDeviceClass *k =3D SYS_BUS_DEVICE_CLASS(klass); > =20 > - k->init =3D isabus_bridge_init; > + dc->realize =3D isabus_bridge_realize; > dc->fw_name =3D "isa"; > dc->no_user =3D 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=3Dqemu.git;a=3Dcommit;h=3D4ce5dae88ecf2bafa0cd663d= e7e923728b1b3672 Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg