Re: [PATCH 4/6] qom: Add object_child_foreach_type() helper function

2019-10-24 Thread Greg Kurz
On Thu, 24 Oct 2019 14:07:15 +1100 David Gibson wrote: > On Thu, Oct 24, 2019 at 01:59:03PM +1100, David Gibson wrote: > > On Wed, Oct 23, 2019 at 04:52:16PM +0200, Greg Kurz wrote: > > > Calling a function for children of a certain type is a recurring pattern > > > in the QEMU code base. In

Re: [PATCH 4/6] qom: Add object_child_foreach_type() helper function

2019-10-23 Thread David Gibson
On Thu, Oct 24, 2019 at 01:59:03PM +1100, David Gibson wrote: > On Wed, Oct 23, 2019 at 04:52:16PM +0200, Greg Kurz wrote: > > Calling a function for children of a certain type is a recurring pattern > > in the QEMU code base. In order to avoid the need to setup the same boiler > > plate again and

Re: [PATCH 4/6] qom: Add object_child_foreach_type() helper function

2019-10-23 Thread David Gibson
On Wed, Oct 23, 2019 at 04:52:16PM +0200, Greg Kurz wrote: > Calling a function for children of a certain type is a recurring pattern > in the QEMU code base. In order to avoid the need to setup the same boiler > plate again and again, introduce a variant of object_child_foreach() that > only

[PATCH 4/6] qom: Add object_child_foreach_type() helper function

2019-10-23 Thread Greg Kurz
Calling a function for children of a certain type is a recurring pattern in the QEMU code base. In order to avoid the need to setup the same boiler plate again and again, introduce a variant of object_child_foreach() that only considers children of the given type. Signed-off-by: Greg Kurz ---