From nobody Thu Nov 6 01:12:41 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538142925177241.1928086256354; Fri, 28 Sep 2018 06:55:25 -0700 (PDT) Received: from localhost ([::1]:43518 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5tEp-00006H-Uc for importer@patchew.org; Fri, 28 Sep 2018 09:55:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55930) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5tA9-0004Up-2U for qemu-devel@nongnu.org; Fri, 28 Sep 2018 09:50:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g5tA7-0006wn-V4 for qemu-devel@nongnu.org; Fri, 28 Sep 2018 09:50:32 -0400 Received: from 1.mo177.mail-out.ovh.net ([178.33.107.143]:56140) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g5tA7-0006wQ-O3 for qemu-devel@nongnu.org; Fri, 28 Sep 2018 09:50:31 -0400 Received: from player691.ha.ovh.net (unknown [10.109.143.109]) by mo177.mail-out.ovh.net (Postfix) with ESMTP id EF0D7CCC41 for ; Fri, 28 Sep 2018 15:50:30 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player691.ha.ovh.net (Postfix) with ESMTPSA id BE19626008E; Fri, 28 Sep 2018 15:50:26 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Jason Wang , qemu-devel@nongnu.org Date: Fri, 28 Sep 2018 15:49:56 +0200 Message-Id: <20180928135003.8650-5-clg@kaod.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180928135003.8650-1-clg@kaod.org> References: <20180928135003.8650-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 3577546956484545535 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtjedruddtledgjedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 178.33.107.143 Subject: [Qemu-devel] [PATCH 04/11] net: lance: convert SysBus init method to a realize method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Thomas Huth --- hw/net/lance.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/net/lance.c b/hw/net/lance.c index a08d5ac6a848..f987b2fd180f 100644 --- a/hw/net/lance.c +++ b/hw/net/lance.c @@ -97,9 +97,9 @@ static const VMStateDescription vmstate_lance =3D { } }; =20 -static int lance_init(SysBusDevice *sbd) +static void lance_realize(DeviceState *dev, Error **errp) { - DeviceState *dev =3D DEVICE(sbd); + SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); SysBusPCNetState *d =3D SYSBUS_PCNET(dev); PCNetState *s =3D &d->state; =20 @@ -115,7 +115,6 @@ static int lance_init(SysBusDevice *sbd) s->phys_mem_read =3D ledma_memory_read; s->phys_mem_write =3D ledma_memory_write; pcnet_common_init(dev, s, &net_lance_info); - return 0; } =20 static void lance_reset(DeviceState *dev) @@ -144,9 +143,8 @@ static Property lance_properties[] =3D { static void lance_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); - SysBusDeviceClass *k =3D SYS_BUS_DEVICE_CLASS(klass); =20 - k->init =3D lance_init; + dc->realize =3D lance_realize; set_bit(DEVICE_CATEGORY_NETWORK, dc->categories); dc->fw_name =3D "ethernet"; dc->reset =3D lance_reset; --=20 2.17.1