We already have access to the 'dev' object. Reviewed-by: Frederic Barrat <fbar...@linux.ibm.com> Signed-off-by: Daniel Henrique Barboza <danielhb...@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