From nobody Thu Nov 6 14:17:15 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; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1541413820568631.7056355173684; Mon, 5 Nov 2018 02:30:20 -0800 (PST) Received: from localhost ([::1]:34326 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJc9D-0004no-BF for importer@patchew.org; Mon, 05 Nov 2018 05:30:19 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53657) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJc4f-0007Wj-Gu for qemu-devel@nongnu.org; Mon, 05 Nov 2018 05:25:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJc0O-0007su-QI for qemu-devel@nongnu.org; Mon, 05 Nov 2018 05:21:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43532) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gJc0L-0004nh-Ni; Mon, 05 Nov 2018 05:21:10 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 055C43082E53; Mon, 5 Nov 2018 10:20:59 +0000 (UTC) Received: from t460s.redhat.com (ovpn-117-149.ams2.redhat.com [10.36.117.149]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5322A5D759; Mon, 5 Nov 2018 10:20:56 +0000 (UTC) From: David Hildenbrand To: qemu-devel@nongnu.org Date: Mon, 5 Nov 2018 11:20:36 +0100 Message-Id: <20181105102044.20547-3-david@redhat.com> In-Reply-To: <20181105102044.20547-1-david@redhat.com> References: <20181105102044.20547-1-david@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 05 Nov 2018 10:20:59 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 02/10] pci/shpc: rename hotplug handler callbacks 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: Eduardo Habkost , "Michael S . Tsirkin" , Cornelia Huck , David Hildenbrand , Alexander Graf , "Dr . David Alan Gilbert" , Christian Borntraeger , qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, Igor Mammedov , Richard Henderson , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The callbacks are also called for cold plugged devices. Drop the "hot" to better match the actual callback names. While at it, also rename shpc_device_hotplug_common() to shpc_device_plug_common(). Signed-off-by: David Hildenbrand Reviewed-by: David Gibson Reviewed-by: Igor Mammedov --- hw/pci-bridge/pci_bridge_dev.c | 17 ++++++++--------- hw/pci-bridge/pcie_pci_bridge.c | 17 ++++++++--------- hw/pci/shpc.c | 14 +++++++------- include/hw/pci/shpc.h | 8 ++++---- 4 files changed, 27 insertions(+), 29 deletions(-) diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c index 97a8e8b6a4..e1df9a52ac 100644 --- a/hw/pci-bridge/pci_bridge_dev.c +++ b/hw/pci-bridge/pci_bridge_dev.c @@ -206,8 +206,8 @@ static const VMStateDescription pci_bridge_dev_vmstate = =3D { } }; =20 -static void pci_bridge_dev_hotplug_cb(HotplugHandler *hotplug_dev, - DeviceState *dev, Error **errp) +static void pci_bridge_dev_plug_cb(HotplugHandler *hotplug_dev, + DeviceState *dev, Error **errp) { PCIDevice *pci_hotplug_dev =3D PCI_DEVICE(hotplug_dev); =20 @@ -216,12 +216,11 @@ static void pci_bridge_dev_hotplug_cb(HotplugHandler = *hotplug_dev, "this %s", TYPE_PCI_BRIDGE_DEV); return; } - shpc_device_hotplug_cb(hotplug_dev, dev, errp); + shpc_device_plug_cb(hotplug_dev, dev, errp); } =20 -static void pci_bridge_dev_hot_unplug_request_cb(HotplugHandler *hotplug_d= ev, - DeviceState *dev, - Error **errp) +static void pci_bridge_dev_unplug_request_cb(HotplugHandler *hotplug_dev, + DeviceState *dev, Error **err= p) { PCIDevice *pci_hotplug_dev =3D PCI_DEVICE(hotplug_dev); =20 @@ -230,7 +229,7 @@ static void pci_bridge_dev_hot_unplug_request_cb(Hotplu= gHandler *hotplug_dev, "this %s", TYPE_PCI_BRIDGE_DEV); return; } - shpc_device_hot_unplug_request_cb(hotplug_dev, dev, errp); + shpc_device_unplug_request_cb(hotplug_dev, dev, errp); } =20 static void pci_bridge_dev_class_init(ObjectClass *klass, void *data) @@ -251,8 +250,8 @@ static void pci_bridge_dev_class_init(ObjectClass *klas= s, void *data) dc->props =3D pci_bridge_dev_properties; dc->vmsd =3D &pci_bridge_dev_vmstate; set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); - hc->plug =3D pci_bridge_dev_hotplug_cb; - hc->unplug_request =3D pci_bridge_dev_hot_unplug_request_cb; + hc->plug =3D pci_bridge_dev_plug_cb; + hc->unplug_request =3D pci_bridge_dev_unplug_request_cb; } =20 static const TypeInfo pci_bridge_dev_info =3D { diff --git a/hw/pci-bridge/pcie_pci_bridge.c b/hw/pci-bridge/pcie_pci_bridg= e.c index 04cf5a6a92..c634353b06 100644 --- a/hw/pci-bridge/pcie_pci_bridge.c +++ b/hw/pci-bridge/pcie_pci_bridge.c @@ -137,8 +137,8 @@ static const VMStateDescription pcie_pci_bridge_dev_vms= tate =3D { } }; =20 -static void pcie_pci_bridge_hotplug_cb(HotplugHandler *hotplug_dev, - DeviceState *dev, Error **errp) +static void pcie_pci_bridge_plug_cb(HotplugHandler *hotplug_dev, + DeviceState *dev, Error **errp) { PCIDevice *pci_hotplug_dev =3D PCI_DEVICE(hotplug_dev); =20 @@ -147,12 +147,11 @@ static void pcie_pci_bridge_hotplug_cb(HotplugHandler= *hotplug_dev, "this %s", TYPE_PCIE_PCI_BRIDGE_DEV); return; } - shpc_device_hotplug_cb(hotplug_dev, dev, errp); + shpc_device_plug_cb(hotplug_dev, dev, errp); } =20 -static void pcie_pci_bridge_hot_unplug_request_cb(HotplugHandler *hotplug_= dev, - DeviceState *dev, - Error **errp) +static void pcie_pci_bridge_unplug_request_cb(HotplugHandler *hotplug_dev, + DeviceState *dev, Error **er= rp) { PCIDevice *pci_hotplug_dev =3D PCI_DEVICE(hotplug_dev); =20 @@ -161,7 +160,7 @@ static void pcie_pci_bridge_hot_unplug_request_cb(Hotpl= ugHandler *hotplug_dev, "this %s", TYPE_PCIE_PCI_BRIDGE_DEV); return; } - shpc_device_hot_unplug_request_cb(hotplug_dev, dev, errp); + shpc_device_unplug_request_cb(hotplug_dev, dev, errp); } =20 static void pcie_pci_bridge_class_init(ObjectClass *klass, void *data) @@ -180,8 +179,8 @@ static void pcie_pci_bridge_class_init(ObjectClass *kla= ss, void *data) dc->props =3D pcie_pci_bridge_dev_properties; dc->reset =3D &pcie_pci_bridge_reset; set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories); - hc->plug =3D pcie_pci_bridge_hotplug_cb; - hc->unplug_request =3D pcie_pci_bridge_hot_unplug_request_cb; + hc->plug =3D pcie_pci_bridge_plug_cb; + hc->unplug_request =3D pcie_pci_bridge_unplug_request_cb; } =20 static const TypeInfo pcie_pci_bridge_info =3D { diff --git a/hw/pci/shpc.c b/hw/pci/shpc.c index a8462d48bb..098ffaef1d 100644 --- a/hw/pci/shpc.c +++ b/hw/pci/shpc.c @@ -482,8 +482,8 @@ static const MemoryRegionOps shpc_mmio_ops =3D { .max_access_size =3D 4, }, }; -static void shpc_device_hotplug_common(PCIDevice *affected_dev, int *slot, - SHPCDevice *shpc, Error **errp) +static void shpc_device_plug_common(PCIDevice *affected_dev, int *slot, + SHPCDevice *shpc, Error **errp) { int pci_slot =3D PCI_SLOT(affected_dev->devfn); *slot =3D SHPC_PCI_TO_IDX(pci_slot); @@ -497,7 +497,7 @@ static void shpc_device_hotplug_common(PCIDevice *affec= ted_dev, int *slot, } } =20 -void shpc_device_hotplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, +void shpc_device_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) { Error *local_err =3D NULL; @@ -505,7 +505,7 @@ void shpc_device_hotplug_cb(HotplugHandler *hotplug_dev= , DeviceState *dev, SHPCDevice *shpc =3D pci_hotplug_dev->shpc; int slot; =20 - shpc_device_hotplug_common(PCI_DEVICE(dev), &slot, shpc, &local_err); + shpc_device_plug_common(PCI_DEVICE(dev), &slot, shpc, &local_err); if (local_err) { error_propagate(errp, local_err); return; @@ -540,8 +540,8 @@ void shpc_device_hotplug_cb(HotplugHandler *hotplug_dev= , DeviceState *dev, shpc_interrupt_update(pci_hotplug_dev); } =20 -void shpc_device_hot_unplug_request_cb(HotplugHandler *hotplug_dev, - DeviceState *dev, Error **errp) +void shpc_device_unplug_request_cb(HotplugHandler *hotplug_dev, + DeviceState *dev, Error **errp) { Error *local_err =3D NULL; PCIDevice *pci_hotplug_dev =3D PCI_DEVICE(hotplug_dev); @@ -550,7 +550,7 @@ void shpc_device_hot_unplug_request_cb(HotplugHandler *= hotplug_dev, uint8_t led; int slot; =20 - shpc_device_hotplug_common(PCI_DEVICE(dev), &slot, shpc, &local_err); + shpc_device_plug_common(PCI_DEVICE(dev), &slot, shpc, &local_err); if (local_err) { error_propagate(errp, local_err); return; diff --git a/include/hw/pci/shpc.h b/include/hw/pci/shpc.h index ee19fecf61..71293aca58 100644 --- a/include/hw/pci/shpc.h +++ b/include/hw/pci/shpc.h @@ -45,10 +45,10 @@ void shpc_free(PCIDevice *dev); void shpc_cap_write_config(PCIDevice *d, uint32_t addr, uint32_t val, int = len); =20 =20 -void shpc_device_hotplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, - Error **errp); -void shpc_device_hot_unplug_request_cb(HotplugHandler *hotplug_dev, - DeviceState *dev, Error **errp); +void shpc_device_plug_cb(HotplugHandler *hotplug_dev, DeviceState *dev, + Error **errp); +void shpc_device_unplug_request_cb(HotplugHandler *hotplug_dev, + DeviceState *dev, Error **errp); =20 extern VMStateInfo shpc_vmstate_info; #define SHPC_VMSTATE(_field, _type, _test) \ --=20 2.17.2