From nobody Tue Oct 28 23:11:59 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 1513543914616987.007577639675; Sun, 17 Dec 2017 12:51:54 -0800 (PST) Received: from localhost ([::1]:55449 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQfuU-0002jb-J7 for importer@patchew.org; Sun, 17 Dec 2017 15:51:46 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQfsR-0001O3-Lj for qemu-devel@nongnu.org; Sun, 17 Dec 2017 15:49:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQfsQ-0005hl-MU for qemu-devel@nongnu.org; Sun, 17 Dec 2017 15:49:39 -0500 Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]:41741) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eQfsQ-0005hJ-H2 for qemu-devel@nongnu.org; Sun, 17 Dec 2017 15:49:38 -0500 Received: by mail-qt0-x243.google.com with SMTP id i40so17852922qti.8 for ; Sun, 17 Dec 2017 12:49:38 -0800 (PST) Received: from x1.local ([181.91.222.165]) by smtp.gmail.com with ESMTPSA id b186sm7296778qka.19.2017.12.17.12.49.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Dec 2017 12:49:37 -0800 (PST) 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=t15Hyid1hiv2RfashwqcoLeayLGfVWN2GK/e405rynw=; b=liw+X3Vpvekr4weoMjcGMonMZkwiB+2k+pkyQahBpJja49G6BeAyY3H33uB+XNXvOs nfMOtFvadDVHbhNEvlfeJsVHRs2hrNcKMX21eFkyP3XCE9u5PRHY9j1RducpQxS94xC8 AP9t/KnD72RJu3y0CLr/6ZCADifT/6g+Lx87AJ66hoPTurrlQ4ozzOOwOlSpuQ9Zirfs F5ebLG9Q0NYtSqTK6GdtF2kWLdsQfEVI2uyK8ynQa5M8eUZyJt07g72332vcpMgesfYZ yO3kJL/lew1fkNzHroL4cELp5nrvG5kKXcY0LUaUoCga2lwPvMQr8YSGPNwIM7dICbbz z1bg== 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=t15Hyid1hiv2RfashwqcoLeayLGfVWN2GK/e405rynw=; b=VeyY9fXPxszkGfCFKYethVoBejuMfGqkMQi9SQEnHFfPdeDw8Vt2s6np+7d9w0aHGH +IIxiIktFA9CPWaE3mSacGoo+ZLDTvp4GMrufTMLlhdqjOitjwroC0+Ee5WCtmF9WHoj ieZmSYdjmcEbg8YTN6LuHlVHQs1CD5PPISlpwhzrNjO/d9EFWu8MeHgsfn5ND9Jqz+M2 wDuJAuJfWWp1/UuCaRCpNV2yRBpeOVQxO7GJx5EJbx4AJII6Zyzw7+TQT3Z40t7LGEDq 923YgWb1CgThDjIAuRW66vhMY0vf942KOoAgMmBNA3mEwSEHOqOqGNRXYq+LQ+UAfPTL B0iQ== X-Gm-Message-State: AKGB3mJZlb5e2foyOHDhmtU38BR6yHg49N2d+QpcMBk+go4o0pFEtlME zUciyTacb5EypXauD7Px7aI= X-Google-Smtp-Source: ACJfBovB73tUZD/WwPU+0qXA73WZD+6q5C2Ikwvwpei9UHux6IJLEj79KkmLyxU/TbuPcADTdU7c4w== X-Received: by 10.237.36.119 with SMTP id s52mr32165579qtc.199.1513543778017; Sun, 17 Dec 2017 12:49:38 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: "Michael S. Tsirkin" , Marcel Apfelbaum , Eduardo Habkost Date: Sun, 17 Dec 2017 17:49:12 -0300 Message-Id: <20171217204912.12420-5-f4bug@amsat.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20171217204912.12420-1-f4bug@amsat.org> References: <20171217204912.12420-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: 2607:f8b0:400d:c0d::243 Subject: [Qemu-devel] [PATCH 4/4] hw/pci: remove obsolete PCIDevice->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?= , 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 All PCI devices are now QOM'ified. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Marcel Apfelbaum --- include/hw/pci/pci.h | 1 - hw/pci/pci.c | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 8d02a0a383..0f1ed64c2f 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -217,7 +217,6 @@ typedef struct PCIDeviceClass { DeviceClass parent_class; =20 void (*realize)(PCIDevice *dev, Error **errp); - int (*init)(PCIDevice *dev);/* TODO convert to realize() and remove */ PCIUnregisterFunc *exit; PCIConfigReadFunc *config_read; PCIConfigWriteFunc *config_write; diff --git a/hw/pci/pci.c b/hw/pci/pci.c index b2d139bd9a..cd25ab6f6b 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -2054,18 +2054,6 @@ static void pci_qdev_realize(DeviceState *qdev, Erro= r **errp) } } =20 -static void pci_default_realize(PCIDevice *dev, Error **errp) -{ - PCIDeviceClass *pc =3D PCI_DEVICE_GET_CLASS(dev); - - if (pc->init) { - if (pc->init(dev) < 0) { - error_setg(errp, "Device initialization failed"); - return; - } - } -} - PCIDevice *pci_create_multifunction(PCIBus *bus, int devfn, bool multifunc= tion, const char *name) { @@ -2538,13 +2526,11 @@ MemoryRegion *pci_address_space_io(PCIDevice *dev) static void pci_device_class_init(ObjectClass *klass, void *data) { DeviceClass *k =3D DEVICE_CLASS(klass); - PCIDeviceClass *pc =3D PCI_DEVICE_CLASS(klass); =20 k->realize =3D pci_qdev_realize; k->unrealize =3D pci_qdev_unrealize; k->bus_type =3D TYPE_PCI_BUS; k->props =3D pci_props; - pc->realize =3D pci_default_realize; } =20 static void pci_device_class_base_init(ObjectClass *klass, void *data) --=20 2.15.1