From nobody Tue Feb 10 06:26:35 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 1499998711815771.8516119584332; Thu, 13 Jul 2017 19:18:31 -0700 (PDT) Received: from localhost ([::1]:35007 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVqBa-0005RA-DE for importer@patchew.org; Thu, 13 Jul 2017 22:18:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVq8k-0003Nw-3h for qemu-devel@nongnu.org; Thu, 13 Jul 2017 22:15:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVq8j-00019I-5r for qemu-devel@nongnu.org; Thu, 13 Jul 2017 22:15:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39968) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dVq8i-00018w-Sx for qemu-devel@nongnu.org; Thu, 13 Jul 2017 22:15:33 -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 E28573D972 for ; Fri, 14 Jul 2017 02:15:31 +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 5B91B61F32; Fri, 14 Jul 2017 02:15:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E28573D972 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 E28573D972 From: Fam Zheng To: qemu-devel@nongnu.org Date: Fri, 14 Jul 2017 10:14:56 +0800 Message-Id: <20170714021509.23681-8-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:32 +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 07/20] virtio-scsi: 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/scsi/virtio-scsi.c | 13 ++----------- hw/virtio/virtio-pci.c | 2 -- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index a0437d1..c5e0606 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -950,8 +950,6 @@ static void virtio_ccw_scsi_instance_init(Object *obj) =20 virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev), TYPE_VIRTIO_SCSI); - object_property_add_alias(obj, "iothread", OBJECT(&dev->vdev), "iothre= ad", - &error_abort); } =20 #ifdef CONFIG_VHOST_SCSI diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index d076fe7..eb63944 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -898,16 +898,6 @@ static void virtio_scsi_device_realize(DeviceState *de= v, Error **errp) virtio_scsi_dataplane_setup(s, errp); } =20 -static void virtio_scsi_instance_init(Object *obj) -{ - VirtIOSCSICommon *vs =3D VIRTIO_SCSI_COMMON(obj); - - object_property_add_link(obj, "iothread", TYPE_IOTHREAD, - (Object **)&vs->conf.iothread, - qdev_prop_allow_set_link_before_realize, - OBJ_PROP_LINK_UNREF_ON_RELEASE, &error_abort); -} - void virtio_scsi_common_unrealize(DeviceState *dev, Error **errp) { VirtIODevice *vdev =3D VIRTIO_DEVICE(dev); @@ -935,6 +925,8 @@ static Property virtio_scsi_properties[] =3D { VIRTIO_SCSI_F_HOTPLUG, true), DEFINE_PROP_BIT("param_change", VirtIOSCSI, host_features, VIRTIO_SCSI_F_CHANGE, true= ), + DEFINE_PROP_LINK("iothread", VirtIOSCSI, parent_obj.conf.iothread, + TYPE_IOTHREAD, IOThread *), DEFINE_PROP_END_OF_LIST(), }; =20 @@ -989,7 +981,6 @@ static const TypeInfo virtio_scsi_info =3D { .name =3D TYPE_VIRTIO_SCSI, .parent =3D TYPE_VIRTIO_SCSI_COMMON, .instance_size =3D sizeof(VirtIOSCSI), - .instance_init =3D virtio_scsi_instance_init, .class_init =3D virtio_scsi_class_init, .interfaces =3D (InterfaceInfo[]) { { TYPE_HOTPLUG_HANDLER }, diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 94f72f3..cc69fe3 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -2069,8 +2069,6 @@ static void virtio_scsi_pci_instance_init(Object *obj) =20 virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev), TYPE_VIRTIO_SCSI); - object_property_add_alias(obj, "iothread", OBJECT(&dev->vdev), "iothre= ad", - &error_abort); } =20 static const TypeInfo virtio_scsi_pci_info =3D { --=20 2.9.4