From: Daniel Henrique Barboza <danielhb@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, clg@kaod.org, fbarrat@linux.ibm.com,
mark.cave-ayland@ilande.co.uk
Subject: [PATCH 04/11] ppc/pnv: use dev instead of pci->qdev in root_port_realize()
Date: Mon, 13 Jun 2022 12:44:49 -0300 [thread overview]
Message-ID: <20220613154456.359674-5-danielhb@linux.ibm.com> (raw)
In-Reply-To: <20220613154456.359674-1-danielhb@linux.ibm.com>
We already have access to the 'dev' object.
Signed-off-by: Daniel Henrique Barboza <danielhb@linux.ibm.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 7901d8172c..bda23fd20b 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 bae9398d86..bfec8b9f6d 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
next prev parent reply other threads:[~2022-06-13 15:52 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-13 15:44 [PATCH 00/11] pnv-phb related cleanups Daniel Henrique Barboza
2022-06-13 15:44 ` [PATCH 01/11] ppc/pnv: move root port attach to pnv_phb4_realize() Daniel Henrique Barboza
2022-06-14 9:08 ` Frederic Barrat
2022-06-14 12:02 ` Cédric Le Goater
2022-06-14 14:10 ` Daniel Henrique Barboza
2022-06-13 15:44 ` [PATCH 02/11] ppc/pnv: attach phb3/phb4 root ports in QOM tree Daniel Henrique Barboza
2022-06-14 9:09 ` Frederic Barrat
2022-06-14 9:53 ` Cédric Le Goater
2022-06-14 12:03 ` Cédric Le Goater
2022-06-13 15:44 ` [PATCH 03/11] ppc/pnv: use dev->parent_bus->parent to get the PHB Daniel Henrique Barboza
2022-06-14 9:10 ` Frederic Barrat
2022-06-17 20:02 ` Daniel Henrique Barboza
2022-06-14 12:10 ` Cédric Le Goater
2022-06-17 21:15 ` Daniel Henrique Barboza
2022-06-13 15:44 ` Daniel Henrique Barboza [this message]
2022-06-14 9:10 ` [PATCH 04/11] ppc/pnv: use dev instead of pci->qdev in root_port_realize() Frederic Barrat
2022-06-13 15:44 ` [PATCH 05/11] ppc/pnv: make pnv_ics_get() use the chip8->phbs[] array Daniel Henrique Barboza
2022-06-14 9:13 ` Frederic Barrat
2022-06-14 9:52 ` Cédric Le Goater
2022-06-13 15:44 ` [PATCH 06/11] ppc/pnv: make pnv_ics_resend() use chip8->phbs[] Daniel Henrique Barboza
2022-06-14 9:24 ` Frederic Barrat
2022-06-14 9:54 ` Cédric Le Goater
2022-06-14 15:11 ` Daniel Henrique Barboza
2022-06-13 15:44 ` [PATCH 07/11] ppc/pnv: make pnv_chip_power8_pic_print_info() " Daniel Henrique Barboza
2022-06-14 9:36 ` Frederic Barrat
2022-06-13 15:44 ` [PATCH 08/11] ppc/pnv: turn chip8->phbs[] into a PnvPHB3* array Daniel Henrique Barboza
2022-06-14 9:53 ` Frederic Barrat
2022-06-14 15:39 ` Daniel Henrique Barboza
2022-06-14 15:52 ` Frederic Barrat
2022-06-14 16:11 ` Cédric Le Goater
2022-06-13 15:44 ` [PATCH 09/11] ppc/pnv: add PHB object/bus parenting helpers Daniel Henrique Barboza
2022-06-13 15:44 ` [PATCH 10/11] ppc/pnv: move PHB3 initialization to realize time Daniel Henrique Barboza
2022-06-14 10:14 ` Frederic Barrat
2022-06-13 15:44 ` [PATCH 11/11] ppc/pnv: move PHB4 parent fixup to phb4_realize() Daniel Henrique Barboza
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220613154456.359674-5-danielhb@linux.ibm.com \
--to=danielhb@linux.ibm.com \
--cc=clg@kaod.org \
--cc=fbarrat@linux.ibm.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).