From nobody Mon Feb 9 19:37:29 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; dkim=fail; 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 150002729285430.347891952095893; Fri, 14 Jul 2017 03:14:52 -0700 (PDT) Received: from localhost ([::1]:36723 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVxcY-0003j3-GG for importer@patchew.org; Fri, 14 Jul 2017 06:14:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42501) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVxYg-0000Nn-Ps for qemu-devel@nongnu.org; Fri, 14 Jul 2017 06:10:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVxYc-000530-L4 for qemu-devel@nongnu.org; Fri, 14 Jul 2017 06:10:50 -0400 Received: from mail-wr0-x241.google.com ([2a00:1450:400c:c0c::241]:35207) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dVxYc-00052R-Dq for qemu-devel@nongnu.org; Fri, 14 Jul 2017 06:10:46 -0400 Received: by mail-wr0-x241.google.com with SMTP id y28so6807458wrd.2 for ; Fri, 14 Jul 2017 03:10:46 -0700 (PDT) Received: from 640k.lan (94-39-191-51.adsl-ull.clienti.tiscali.it. [94.39.191.51]) by smtp.gmail.com with ESMTPSA id 143sm2934870wmg.9.2017.07.14.03.10.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Jul 2017 03:10:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=3LHPFS34XxS+yalujAGCu8znYSXuT/SAZCegkOxAGac=; b=AH2Rmuo26dJzddio+Z26C12yt+QWTq0MZLfJI1bmO/g6Q0SAolQErXalVh20odgEVs fkBQg6jMBfhhp1LvuPKb8b50zz0F8YmUGbFPZ3q38FI7VA77aADljKmmUNcmbltpYKwu OIANti0gcu26soPiZT/Q2O/iRv7kRTSnB5qqMp169Yjm9heY4lHkAI47rJwqcG5XlOw8 Di4KzwpvTIG5JBILmM25vKJbPfzVIsFzO1kciuTWqEdFVb9l+EdH3dWPVu2rZrWBmkMZ uSTrYqVGC1szEXqrwaoo0WKxyB/J/cSTnmStcw+Q6VlVk/AmQg4Yk7ZkRbXkt72u/opx 9stw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=3LHPFS34XxS+yalujAGCu8znYSXuT/SAZCegkOxAGac=; b=pQlOCBq6/AiEnprr82UoIUOBo0Y3tDRz4ZwMYZzFxnd2Z6ds9AzaWni5cHmbaCeAJU +ZRcAU2AaJv1DMY3dTiv6PijAJ+fqswwG/Spc7XXoDXhc4LOvphJewOo6XgGDTUONmFo d4XzWqyozKECDTTS/K67aCZTDg10/glo6u6vyiOwFfGdK1nAQGUIxoEc+wQsVq6apBrH AV16r34Y1ZIzfppO5aBkSlTgN5Vm2c/c6AEWorG94Xd0F/RA+JhLuKfc82lCY/pyaOGR jagXrqufzcgG0P0XI4qAItbIAtnehMxObH57cOvqnV/k2ThyJFuIlg7XFQ1a9a1DBYnL sRCg== X-Gm-Message-State: AIVw113uq0vUbcMHkYaXSQalyxyNAH9wHXhSqjB/+V93FWLmsGKwzHgn gvY+52ry6xgS44qVrAA= X-Received: by 10.223.146.4 with SMTP id 4mr3782339wrj.76.1500027045299; Fri, 14 Jul 2017 03:10:45 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Fri, 14 Jul 2017 12:10:22 +0200 Message-Id: <1500027028-4127-11-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1500027028-4127-1-git-send-email-pbonzini@redhat.com> References: <1500027028-4127-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::241 Subject: [Qemu-devel] [PULL 49/55] 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: Fam Zheng Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Fam Zheng Signed-off-by: Fam Zheng Message-Id: <20170714021509.23681-9-famz@redhat.com> Signed-off-by: Paolo Bonzini --- 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 1.8.3.1