Re: [Qemu-devel] [PATCH 1/2] hw/sysbus.h: New sysbus_init_child() helper function

2018-03-26 Thread Igor Mammedov
On Sat, 24 Mar 2018 12:35:22 -0300 Philippe Mathieu-Daudé wrote: > Hi, > > On 02/20/2018 10:23 AM, Igor Mammedov wrote: > > On Tue, 20 Feb 2018 13:13:49 +0100 > > Paolo Bonzini wrote: > > > >> On 16/02/2018 18:40, Philippe Mathieu-Daudé wrote: > >>>

Re: [Qemu-devel] [PATCH 1/2] hw/sysbus.h: New sysbus_init_child() helper function

2018-03-24 Thread Philippe Mathieu-Daudé
Hi, On 02/20/2018 10:23 AM, Igor Mammedov wrote: > On Tue, 20 Feb 2018 13:13:49 +0100 > Paolo Bonzini wrote: > >> On 16/02/2018 18:40, Philippe Mathieu-Daudé wrote: >>> we can keep object_initialize() when no parent, >>> and add object_initialize_child(, const char

Re: [Qemu-devel] [PATCH 1/2] hw/sysbus.h: New sysbus_init_child() helper function

2018-02-20 Thread Igor Mammedov
On Tue, 20 Feb 2018 13:13:49 +0100 Paolo Bonzini wrote: > On 16/02/2018 18:40, Philippe Mathieu-Daudé wrote: > > we can keep object_initialize() when no parent, > > and add object_initialize_child(, const char *childname, Object *parent) > > 'parent' last because all

Re: [Qemu-devel] [PATCH 1/2] hw/sysbus.h: New sysbus_init_child() helper function

2018-02-20 Thread Paolo Bonzini
On 16/02/2018 18:40, Philippe Mathieu-Daudé wrote: > we can keep object_initialize() when no parent, > and add object_initialize_child(, const char *childname, Object *parent) > 'parent' last because all previous args are child-related. > >> >>> +qdev_set_parent_bus(DEVICE(child),

Re: [Qemu-devel] [PATCH 1/2] hw/sysbus.h: New sysbus_init_child() helper function

2018-02-16 Thread Philippe Mathieu-Daudé
On 02/16/2018 01:28 PM, Igor Mammedov wrote: > On Fri, 16 Feb 2018 13:45:15 + > Peter Maydell wrote: ... >> static void sysbus_dev_print(Monitor *mon, DeviceState *dev, int indent); >> static char *sysbus_get_fw_dev_path(DeviceState *dev); >> @@ -372,6 +373,19 @@

Re: [Qemu-devel] [PATCH 1/2] hw/sysbus.h: New sysbus_init_child() helper function

2018-02-16 Thread Igor Mammedov
On Fri, 16 Feb 2018 13:45:15 + Peter Maydell wrote: > If you're using the increasingly-common QOM style of > having container devices create their child objects > in-place, you end up with a lot of boilerplate in the > container's init function: > >