From nobody Thu Nov 6 00:40:57 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; dkim=fail; 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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538432519795112.23410315802073; Mon, 1 Oct 2018 15:21:59 -0700 (PDT) Received: from localhost ([::1]:40922 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g76Za-0005Mn-0r for importer@patchew.org; Mon, 01 Oct 2018 18:21:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g76XN-00041R-Eo for qemu-devel@nongnu.org; Mon, 01 Oct 2018 18:19:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g76Oc-0007Re-K6 for qemu-devel@nongnu.org; Mon, 01 Oct 2018 18:10:31 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:36899) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g76Oc-0007Ka-93 for qemu-devel@nongnu.org; Mon, 01 Oct 2018 18:10:30 -0400 Received: by mail-wm1-x341.google.com with SMTP id 185-v6so290838wmt.2 for ; Mon, 01 Oct 2018 15:10:09 -0700 (PDT) Received: from x1.local (11.red-88-24-160.staticip.rima-tde.net. [88.24.160.11]) by smtp.gmail.com with ESMTPSA id 185-v6sm13554914wmy.38.2018.10.01.15.10.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Oct 2018 15:10:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=98oYneg53qPOLyu70wT0GXMiXaFUAGxT4nWfd3vHJlY=; b=LiHdxqzgpFYO9FKV9qUgxH6RdZPQyXjiE62gqpIjtxsPKR+KUQTAOtOxCDoz3A99kp EW2QRpfdNGRGristTbYLImOSCakTsY0TlxiPcEwCHm7edSkqALn5XhaV+rIyjPmvlNxw dROppQmjysE5M/EzAi6GSYqyq71+hPF41ZM8SnOAfQnAJdLsaG55+KgvC4I/vHA3HNDw 2ecjgQFWa7J8zQzBmhZ+OUV1TxvezUnu4AAzjss05HYAPa/i+wGojgGzeOJuFY2jhGW8 1TWT7vqRQD7XNOvChADo/pbJAQ/cBMrqqy8P0sAtwXazJ+KiKP59uyVIqnCV08gphr6R +N+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=98oYneg53qPOLyu70wT0GXMiXaFUAGxT4nWfd3vHJlY=; b=L52dBGt1fYSZhqCtPfno94UvRXcbwjWxU3zbLwF6vADiG/oumbxA+KXydOGrVNO2sJ ZgNDRSWyecKE87Nn0Fr91SeG5U5lUaTLLK9b5prpTF4LEx0Q/5BoI2tYrfuFxUVafO5j ME5MlZnzRgwENr99IJN1AFwD0U/N3qpPerTKAU33+lmRMCoyNrX0RTCJiGumTelbRG6F Uy5ABJnweQFUNPrM1M5+7eofVvp/jj8IymnhuduzOg8byhu2kklU59q9h3WDxlLGnPEO T1k1yxb6qaW7pXFLKQzEIlxzXt2fnfr0ToYjJR1BGRvo1BqCbuMynOUqog0YlNJsft8D CoSQ== X-Gm-Message-State: ABuFfoi5/LRRfZ1OeZzWUbTTzb1jZABo6Nnlzj4XEO3AUmpLdyeZ0VZE kt0LA5mtgvkFVVBkw40aNDRwGucF X-Google-Smtp-Source: ACcGV621VgqKP7CTd1qWsW6GPPs9cUoR3tRNgVatmoSYuLuVp/olisbmHYM7ykCqkQRgcnGPF/Dsyg== X-Received: by 2002:a1c:a794:: with SMTP id q142-v6mr6815864wme.77.1538431808800; Mon, 01 Oct 2018 15:10:08 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Peter Maydell , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Date: Tue, 2 Oct 2018 00:09:33 +0200 Message-Id: <20181001220942.2382-7-f4bug@amsat.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181001220942.2382-1-f4bug@amsat.org> References: <20181001220942.2382-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 Subject: [Qemu-devel] [PATCH 06/15] hw/pci-host/bonito: Use DeviceState::realize rather than SysBusDevice::init 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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Move from the legacy SysBusDevice::init method to using DeviceState::realiz= e. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/pci-host/bonito.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 9868e2eccc..03d1ec33e3 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -595,7 +595,7 @@ static const VMStateDescription vmstate_bonito =3D { } }; =20 -static int bonito_pcihost_initfn(SysBusDevice *dev) +static void bonito_pcihost_realize(PCIDevice *dev, Error **errp) { PCIHostState *phb =3D PCI_HOST_BRIDGE(dev); =20 @@ -603,8 +603,6 @@ static int bonito_pcihost_initfn(SysBusDevice *dev) pci_bonito_set_irq, pci_bonito_map_ir= q, dev, get_system_memory(), get_system_= io(), 0x28, 32, TYPE_PCI_BUS); - - return 0; } =20 static void bonito_realize(PCIDevice *dev, Error **errp) @@ -684,7 +682,6 @@ PCIBus *bonito_init(qemu_irq *pic) pcihost->pic =3D pic; qdev_init_nofail(dev); =20 - /* set the pcihost pointer before bonito_initfn is called */ d =3D pci_create(phb->bus, PCI_DEVFN(0, 0), TYPE_PCI_BONITO); s =3D PCI_BONITO(d); s->pcihost =3D pcihost; @@ -726,9 +723,9 @@ static const TypeInfo bonito_info =3D { =20 static void bonito_pcihost_class_init(ObjectClass *klass, void *data) { - SysBusDeviceClass *k =3D SYS_BUS_DEVICE_CLASS(klass); + PCIDeviceClass *k =3D PCI_DEVICE_CLASS(klass); =20 - k->init =3D bonito_pcihost_initfn; + k->realize =3D bonito_pcihost_realize; } =20 static const TypeInfo bonito_pcihost_info =3D { --=20 2.19.0