Re: [Qemu-devel] [PATCH v2 3/6] hw/arm: Use sysbus_init_child_obj for correct reference counting

2019-09-03 Thread Peter Maydell
On Fri, 23 Aug 2019 at 16:26, Thomas Huth wrote: > > On 8/23/19 4:32 PM, Philippe Mathieu-Daudé wrote: > > As explained in commit aff39be0ed97: > > > > Both functions, object_initialize() and qdev_set_parent_bus() > > Commit aff39be0ed97 was not about qdev_set_parent_bus(), so the first > senten

Re: [Qemu-devel] [PATCH v2 3/6] hw/arm: Use sysbus_init_child_obj for correct reference counting

2019-08-23 Thread Richard Henderson
On 8/23/19 7:32 AM, Philippe Mathieu-Daudé wrote: > diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c > index f69358a5ba..2781d8bd41 100644 > --- a/hw/arm/exynos4_boards.c > +++ b/hw/arm/exynos4_boards.c > @@ -131,8 +131,8 @@ exynos4_boards_init_common(MachineState *machine, > exy

Re: [Qemu-devel] [PATCH v2 3/6] hw/arm: Use sysbus_init_child_obj for correct reference counting

2019-08-23 Thread Thomas Huth
On 8/23/19 4:32 PM, Philippe Mathieu-Daudé wrote: > As explained in commit aff39be0ed97: > > Both functions, object_initialize() and qdev_set_parent_bus() Commit aff39be0ed97 was not about qdev_set_parent_bus(), so the first sentence sounds somewhat misleading here. Maybe rephrase the commit me

[Qemu-devel] [PATCH v2 3/6] hw/arm: Use sysbus_init_child_obj for correct reference counting

2019-08-23 Thread Philippe Mathieu-Daudé
As explained in commit aff39be0ed97: Both functions, object_initialize() and qdev_set_parent_bus() increase the reference counter of the new object, so one of the references has to be dropped afterwards to get the reference counting right. Otherwise the child object will not be properly