From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYllV-0002QL-6M for qemu-devel@nongnu.org; Mon, 29 Sep 2014 20:58:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYllP-0004vn-2X for qemu-devel@nongnu.org; Mon, 29 Sep 2014 20:58:05 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:19103) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYllO-0004tA-Fc for qemu-devel@nongnu.org; Mon, 29 Sep 2014 20:57:59 -0400 From: "Gonglei (Arei)" Date: Tue, 30 Sep 2014 00:57:24 +0000 Message-ID: <33183CC9F5247A488A2544077AF1902086DDD190@SZXEMA503-MBS.china.huawei.com> References: <1411721147-11712-1-git-send-email-arei.gonglei@huawei.com> <20140926162125.71ea6598.cornelia.huck@de.ibm.com> <33183CC9F5247A488A2544077AF1902086DDC6DD@SZXEMA503-MBS.china.huawei.com> <20140929125309.3b3483d0.cornelia.huck@de.ibm.com> <33183CC9F5247A488A2544077AF1902086DDCCC8@SZXEMA503-MBS.china.huawei.com> <20140929123332.GA1429@redhat.com> <20140929151026.565da3fd.cornelia.huck@de.ibm.com> In-Reply-To: <20140929151026.565da3fd.cornelia.huck@de.ibm.com> Content-Language: zh-CN Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck , "Michael S. Tsirkin" Cc: "agraf@suse.de" , "Huangweidong (C)" , "armbru@redhat.com" , Luonengjun , "Huangpeng (Peter)" , "qemu-devel@nongnu.org" , "borntraeger@de.ibm.com" , "stefanha@redhat.com" , "pbonzini@redhat.com" , "rth@twiddle.net" > > > > > > > > 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? > > >=20 > Yes, sounds good to me. Will do, thanks you both! Best regards, -Gonglei