On Thu, 8 Jun 2017 07:50:08 +0200 Cédric Le Goater <c...@kaod.org> wrote:
> On 06/07/2017 10:55 PM, Greg Kurz wrote: > [...] > >>> + obj = object_new(TYPE_PNV_ICP); > >>> + object_property_add_child(child, "icp", obj, NULL); > >>> + object_unref(obj); > >>> + object_property_add_const_link(obj, "xics", OBJECT(xi), > >>> &error_abort); > >>> + object_property_add_const_link(obj, "cs", child, &error_abort); > >> > >> may be link the cpu object instead ? > >> > > > > I'm not sure to understand... isn't child supposed to be a CPU index here ? > > > > I meant linking the 'PowerPCCPU *cpu' object and not the CPUState. > That's minor. > Well, cpu == cs == child and object_property_add_const_link() expects an Object *. Passing child avoids a not-really-useful OBJECT() dynamic cast.
pgp6YeK2L99FI.pgp
Description: OpenPGP digital signature