Re: [PATCH v2 for-5.0 0/8] ppc: Consolidate QOM links and pointers to the same object

2019-11-18 Thread Greg Kurz
On Mon, 18 Nov 2019 10:26:12 +0100 Markus Armbruster wrote: > Greg Kurz writes: > > > There's a recurring pattern in the code where a const link is added to a > > newly instanciated object and the link is then used in the object's realize > > function to keep a pointer to the QOM entity which t

Re: [PATCH v2 for-5.0 0/8] ppc: Consolidate QOM links and pointers to the same object

2019-11-18 Thread Cédric Le Goater
On 18/11/2019 10:26, Markus Armbruster wrote: > Greg Kurz writes: > >> There's a recurring pattern in the code where a const link is added to a >> newly instanciated object and the link is then used in the object's realize >> function to keep a pointer to the QOM entity which the link points to.

Re: [PATCH v2 for-5.0 0/8] ppc: Consolidate QOM links and pointers to the same object

2019-11-18 Thread Markus Armbruster
Greg Kurz writes: > There's a recurring pattern in the code where a const link is added to a > newly instanciated object and the link is then used in the object's realize > function to keep a pointer to the QOM entity which the link points to. > > void create_obj_b(Object *obj_a) > { > Object

Re: [PATCH v2 for-5.0 0/8] ppc: Consolidate QOM links and pointers to the same object

2019-11-15 Thread David Gibson
On Fri, Nov 15, 2019 at 04:55:21PM +0100, Greg Kurz wrote: > There's a recurring pattern in the code where a const link is added to a > newly instanciated object and the link is then used in the object's realize > function to keep a pointer to the QOM entity which the link points to. > > void crea

[PATCH v2 for-5.0 0/8] ppc: Consolidate QOM links and pointers to the same object

2019-11-15 Thread Greg Kurz
There's a recurring pattern in the code where a const link is added to a newly instanciated object and the link is then used in the object's realize function to keep a pointer to the QOM entity which the link points to. void create_obj_b(Object *obj_a) { Object *obj_b; obj_b = object_new(