Am 25.02.2013 08:55, schrieb Paolo Bonzini: > >> Another thing is, that qdev_free looks now different, some days ago >> it also did an unref. As far as I can see the object_unparent in >> virtio-ccw was always the wrong thing to do. > > object_unparent is "almost" idempotent, i.e. idempotent as long as it does > not cause the last reference to go away. So, doing an object_unparent > before qdev_free was not wrong when qdev_free did an object_unref. > > I think qdev_free is better, unless we want to change all of them > at the same time.
I did have a patch doing that but revoked it because I thought you said you wanted to do it differently as part of your series... If it stays it needs to be renamed device_* and probably not *_free either since that depends on reference count. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg