> > > > > > > > Hm... > > > > > > > > void virtio_instance_init_common(Object *proxydev, > > > > DeviceState *vdev, > > > > size_t vdevsize, > > > > const char *vdevname) > > > > { > > > > object_initialize(vdev, vdevsize, vdevname); > > > > object_property_add_child(proxydev, "virtio-backend", > OBJECT(vdev), > > > > NULL); > > > > object_unref(OBJECT(vdev)); > > > > qdev_alias_all_properties(vdev, proxydev); > > > > } > > > > > > > > and have the initializers call > > > > > > > > virtio_instance_init_common(obj, DEVICE(&dev->vdev), > sizeof(dev->vdev), > > > > TYPE_WHATEVER); > > > > > > > > ? > > > > > > OK, it looks good that pass all parameters to one wrapper function. > > > Will do this in next version. > > > > > > Thanks, Cornelia. :) > > > > > > Best regards, > > > -Gonglei > > > > I'm fine with doing the cleanup as a patch on top. > > Cornelia, fine with you? > > > > Yes, sounds good to me.
Will do, thanks you both! Best regards, -Gonglei