From nobody Thu Nov 6 01:31:21 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 1538376276954938.9524019486016; Sun, 30 Sep 2018 23:44:36 -0700 (PDT) Received: from localhost ([::1]:59693 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rwZ-0005uK-NK for importer@patchew.org; Mon, 01 Oct 2018 02:44:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58068) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6rrg-0001b8-BO for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:39:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6rra-0006nw-Gf for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:39:32 -0400 Received: from 4.mo2.mail-out.ovh.net ([87.98.172.75]:57869) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g6rrX-0006gF-DR for qemu-devel@nongnu.org; Mon, 01 Oct 2018 02:39:24 -0400 Received: from player699.ha.ovh.net (unknown [10.109.146.19]) by mo2.mail-out.ovh.net (Postfix) with ESMTP id 1645016323C for ; Mon, 1 Oct 2018 08:39:19 +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 player699.ha.ovh.net (Postfix) with ESMTPSA id AA077240097; Mon, 1 Oct 2018 08:39:12 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: Jason Wang , qemu-devel@nongnu.org Date: Mon, 1 Oct 2018 08:38:03 +0200 Message-Id: <20181001063803.22330-12-clg@kaod.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181001063803.22330-1-clg@kaod.org> References: <20181001063803.22330-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 13913589577721482239 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtjedruddugedgjeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 87.98.172.75 Subject: [Qemu-devel] [PATCH v2 11/11] net: xgmac: 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: Rob Herring , Peter Maydell , qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?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" Cc: Peter Maydell Cc: qemu-arm@nongnu.org Cc: Rob Herring Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/net/xgmac.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/net/xgmac.c b/hw/net/xgmac.c index fa001563d3de..63f5a62ebf1b 100644 --- a/hw/net/xgmac.c +++ b/hw/net/xgmac.c @@ -374,9 +374,9 @@ static NetClientInfo net_xgmac_enet_info =3D { .receive =3D eth_rx, }; =20 -static int xgmac_enet_init(SysBusDevice *sbd) +static void xgmac_enet_realize(DeviceState *dev, Error **errp) { - DeviceState *dev =3D DEVICE(sbd); + SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); XgmacState *s =3D XGMAC(dev); =20 memory_region_init_io(&s->iomem, OBJECT(s), &enet_mem_ops, s, @@ -397,8 +397,6 @@ static int xgmac_enet_init(SysBusDevice *sbd) (s->conf.macaddr.a[2] << 16) | (s->conf.macaddr.a[1] << 8) | s->conf.macaddr.a[0]; - - return 0; } =20 static Property xgmac_properties[] =3D { @@ -408,10 +406,9 @@ static Property xgmac_properties[] =3D { =20 static void xgmac_enet_class_init(ObjectClass *klass, void *data) { - SysBusDeviceClass *sbc =3D SYS_BUS_DEVICE_CLASS(klass); DeviceClass *dc =3D DEVICE_CLASS(klass); =20 - sbc->init =3D xgmac_enet_init; + dc->realize =3D xgmac_enet_realize; dc->vmsd =3D &vmstate_xgmac; dc->props =3D xgmac_properties; } --=20 2.17.1