From nobody Tue Feb 10 04:16:31 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1499998859051145.2347317699988; Thu, 13 Jul 2017 19:20:59 -0700 (PDT) Received: from localhost ([::1]:35020 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVqDv-0008Ew-P8 for importer@patchew.org; Thu, 13 Jul 2017 22:20:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVq8m-0003Pd-6l for qemu-devel@nongnu.org; Thu, 13 Jul 2017 22:15:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVq8l-0001B1-3k for qemu-devel@nongnu.org; Thu, 13 Jul 2017 22:15:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40026) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dVq8k-0001Al-Qa for qemu-devel@nongnu.org; Thu, 13 Jul 2017 22:15:35 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CF74A267C5 for ; Fri, 14 Jul 2017 02:15:33 +0000 (UTC) Received: from lemon.redhat.com (ovpn-12-51.pek2.redhat.com [10.72.12.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6721961F21; Fri, 14 Jul 2017 02:15:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CF74A267C5 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=famz@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com CF74A267C5 From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 14 Jul 2017 10:14:57 +0800 Message-Id: <20170714021509.23681-9-famz@redhat.com> In-Reply-To: <20170714021509.23681-1-famz@redhat.com> References: <20170714021509.23681-1-famz@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 14 Jul 2017 02:15:33 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v4 08/20] virtio-rng: Convert to DEFINE_PROP_LINK X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Igor Mammedov Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Fam Zheng --- hw/s390x/virtio-ccw.c | 2 -- hw/virtio/virtio-pci.c | 2 -- hw/virtio/virtio-rng.c | 12 +----------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index c5e0606..a492d0f 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -1548,8 +1548,6 @@ static void virtio_ccw_rng_instance_init(Object *obj) =20 virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev), TYPE_VIRTIO_RNG); - object_property_add_alias(obj, "rng", OBJECT(&dev->vdev), - "rng", &error_abort); } =20 static Property virtio_ccw_rng_properties[] =3D { diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index cc69fe3..5d14bd6 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -2463,8 +2463,6 @@ static void virtio_rng_initfn(Object *obj) =20 virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev), TYPE_VIRTIO_RNG); - object_property_add_alias(obj, "rng", OBJECT(&dev->vdev), "rng", - &error_abort); } =20 static const TypeInfo virtio_rng_pci_info =3D { diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c index a6ee501..289bbca 100644 --- a/hw/virtio/virtio-rng.c +++ b/hw/virtio/virtio-rng.c @@ -246,6 +246,7 @@ static Property virtio_rng_properties[] =3D { */ DEFINE_PROP_UINT64("max-bytes", VirtIORNG, conf.max_bytes, INT64_MAX), DEFINE_PROP_UINT32("period", VirtIORNG, conf.period_ms, 1 << 16), + DEFINE_PROP_LINK("rng", VirtIORNG, conf.rng, TYPE_RNG_BACKEND, RngBack= end *), DEFINE_PROP_END_OF_LIST(), }; =20 @@ -262,21 +263,10 @@ static void virtio_rng_class_init(ObjectClass *klass,= void *data) vdc->get_features =3D get_features; } =20 -static void virtio_rng_initfn(Object *obj) -{ - VirtIORNG *vrng =3D VIRTIO_RNG(obj); - - object_property_add_link(obj, "rng", TYPE_RNG_BACKEND, - (Object **)&vrng->conf.rng, - qdev_prop_allow_set_link_before_realize, - OBJ_PROP_LINK_UNREF_ON_RELEASE, NULL); -} - static const TypeInfo virtio_rng_info =3D { .name =3D TYPE_VIRTIO_RNG, .parent =3D TYPE_VIRTIO_DEVICE, .instance_size =3D sizeof(VirtIORNG), - .instance_init =3D virtio_rng_initfn, .class_init =3D virtio_rng_class_init, }; =20 --=20 2.9.4