[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 4/9] ppc/pnv: use dev instead of pci->qdev in root_port_realiz
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH v2 4/9] ppc/pnv: use dev instead of pci->qdev in root_port_realize() |
Date: |
Sat, 18 Jun 2022 08:01:57 -0300 |
We already have access to the 'dev' object.
Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
hw/pci-host/pnv_phb3.c | 4 ++--
hw/pci-host/pnv_phb4.c | 5 ++---
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw/pci-host/pnv_phb3.c b/hw/pci-host/pnv_phb3.c
index 5e7f827415..8c03cc94f2 100644
--- a/hw/pci-host/pnv_phb3.c
+++ b/hw/pci-host/pnv_phb3.c
@@ -1157,8 +1157,8 @@ static void pnv_phb3_root_port_realize(DeviceState *dev,
Error **errp)
}
/* Set unique chassis/slot values for the root port */
- qdev_prop_set_uint8(&pci->qdev, "chassis", phb->chip_id);
- qdev_prop_set_uint16(&pci->qdev, "slot", phb->phb_id);
+ qdev_prop_set_uint8(dev, "chassis", phb->chip_id);
+ qdev_prop_set_uint16(dev, "slot", phb->phb_id);
rpc->parent_realize(dev, &local_err);
if (local_err) {
diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c
index a0ee52e820..61b45fe33c 100644
--- a/hw/pci-host/pnv_phb4.c
+++ b/hw/pci-host/pnv_phb4.c
@@ -1781,7 +1781,6 @@ static void pnv_phb4_root_port_reset(DeviceState *dev)
static void pnv_phb4_root_port_realize(DeviceState *dev, Error **errp)
{
PCIERootPortClass *rpc = PCIE_ROOT_PORT_GET_CLASS(dev);
- PCIDevice *pci = PCI_DEVICE(dev);
PnvPHB4 *phb = NULL;
Error *local_err = NULL;
@@ -1799,8 +1798,8 @@ static void pnv_phb4_root_port_realize(DeviceState *dev,
Error **errp)
}
/* Set unique chassis/slot values for the root port */
- qdev_prop_set_uint8(&pci->qdev, "chassis", phb->chip_id);
- qdev_prop_set_uint16(&pci->qdev, "slot", phb->phb_id);
+ qdev_prop_set_uint8(dev, "chassis", phb->chip_id);
+ qdev_prop_set_uint16(dev, "slot", phb->phb_id);
rpc->parent_realize(dev, &local_err);
if (local_err) {
--
2.36.1
- [PATCH v2 0/9] pnv-phb related cleanups, Daniel Henrique Barboza, 2022/06/18
- [PATCH v2 1/9] ppc/pnv: move root port attach to pnv_phb4_realize(), Daniel Henrique Barboza, 2022/06/18
- [PATCH v2 2/9] ppc/pnv: attach phb3/phb4 root ports in QOM tree, Daniel Henrique Barboza, 2022/06/18
- [PATCH v2 3/9] ppc/pnv: use dev->parent_bus->parent to get the PHB, Daniel Henrique Barboza, 2022/06/18
- [PATCH v2 4/9] ppc/pnv: use dev instead of pci->qdev in root_port_realize(),
Daniel Henrique Barboza <=
- [PATCH v2 7/9] ppc/pnv: make pnv_chip_power8_pic_print_info() use chip8->phbs[], Daniel Henrique Barboza, 2022/06/18
- [PATCH v2 5/9] ppc/pnv: make pnv_ics_get() use the chip8->phbs[] array, Daniel Henrique Barboza, 2022/06/18
- [PATCH v2 6/9] ppc/pnv: make pnv_ics_resend() use chip8->phbs[], Daniel Henrique Barboza, 2022/06/18
- [PATCH v2 8/9] ppc/pnv: remove 'INTERFACE_PCIE_DEVICE' from phb3 root bus, Daniel Henrique Barboza, 2022/06/18