Re: [PATCH v2 3/9] ppc/pnv: use dev->parent_bus->parent to get the PHB

2022-06-20 Thread Daniel Henrique Barboza
On 6/20/22 04:27, Mark Cave-Ayland wrote: On 18/06/2022 12:01, Daniel Henrique Barboza wrote: It is not advisable to execute an object_dynamic_cast() to poke into bus->qbus.parent and follow it up with a C cast into the PnvPHB type we think we got. A better way is to access the PnvPHB objec

Re: [PATCH v2 3/9] ppc/pnv: use dev->parent_bus->parent to get the PHB

2022-06-20 Thread Mark Cave-Ayland
On 18/06/2022 12:01, Daniel Henrique Barboza wrote: It is not advisable to execute an object_dynamic_cast() to poke into bus->qbus.parent and follow it up with a C cast into the PnvPHB type we think we got. A better way is to access the PnvPHB object via a QOM macro accessing the existing paren

[PATCH v2 3/9] ppc/pnv: use dev->parent_bus->parent to get the PHB

2022-06-18 Thread Daniel Henrique Barboza
It is not advisable to execute an object_dynamic_cast() to poke into bus->qbus.parent and follow it up with a C cast into the PnvPHB type we think we got. A better way is to access the PnvPHB object via a QOM macro accessing the existing parent links of the DeviceState. For a given pnv-phb3/4-root