On Sat, 25 Oct 2025, Philippe Mathieu-Daudé wrote:
On 25/10/25 14:55, BALATON Zoltan wrote:
We need the device casted to OBJECT often enough in realize to store
it in a local variable that also makes function calls more readable.

Signed-off-by: BALATON Zoltan <[email protected]>
---
Based-on: <[email protected]>

hw/pci-host/articia.c | 14 +++++++-------
  1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/hw/pci-host/articia.c b/hw/pci-host/articia.c
index 761e89bc8f..56fe3b6953 100644
--- a/hw/pci-host/articia.c
+++ b/hw/pci-host/articia.c
@@ -174,24 +174,24 @@ static void articia_realize(DeviceState *dev, Error **errp)
  {
      ArticiaState *s = ARTICIA(dev);
      PCIHostState *h = PCI_HOST_BRIDGE(dev);
+    Object *o = OBJECT(dev);

Preferably "obj".

Since you said preferably I take that as personal preference and leave it as it is :-) I prefer shorter names for these to match s and h and to have a chance to fit in the 80 char limit with long_snake_case_function_names.

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>

I hope I can still keep your R-b.
Thanks,
BALATON Zoltan

Reply via email to