[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 2/9] virtio: Drop broken and superfluous object_property_set_link(
From: |
Michael S. Tsirkin |
Subject: |
[PULL 2/9] virtio: Drop broken and superfluous object_property_set_link() |
Date: |
Wed, 22 Jul 2020 08:09:10 -0400 |
From: Markus Armbruster <armbru@redhat.com>
virtio_crypto_pci_realize() and copies the value of vcrypto->vdev's
property "cryptodev" to vcrypto's property:
object_property_set_link(OBJECT(vrng), "rng", OBJECT(vrng->vdev.conf.rng),
NULL);
Since it does so only after realize, this always fails, but the error
is ignored.
It's actually superfluous: vcrypto's property is an alias of
vcrypto->vdev's property, created by virtio_instance_init_common().
Drop the call.
Same for virtio_ccw_crypto_realize(), virtio_rng_pci_realize(),
virtio_ccw_rng_realize().
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200721121153.1128844-1-armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/s390x/virtio-ccw-crypto.c | 3 ---
hw/s390x/virtio-ccw-rng.c | 3 ---
hw/virtio/virtio-crypto-pci.c | 2 --
hw/virtio/virtio-rng-pci.c | 3 ---
4 files changed, 11 deletions(-)
diff --git a/hw/s390x/virtio-ccw-crypto.c b/hw/s390x/virtio-ccw-crypto.c
index 570c0333fc..358c74fb4b 100644
--- a/hw/s390x/virtio-ccw-crypto.c
+++ b/hw/s390x/virtio-ccw-crypto.c
@@ -23,9 +23,6 @@ static void virtio_ccw_crypto_realize(VirtioCcwDevice
*ccw_dev, Error **errp)
if (!qdev_realize(vdev, BUS(&ccw_dev->bus), errp)) {
return;
}
-
- object_property_set_link(OBJECT(vdev), "cryptodev",
- OBJECT(dev->vdev.conf.cryptodev), NULL);
}
static void virtio_ccw_crypto_instance_init(Object *obj)
diff --git a/hw/s390x/virtio-ccw-rng.c b/hw/s390x/virtio-ccw-rng.c
index 4bb8c16d79..2e3a9da5e8 100644
--- a/hw/s390x/virtio-ccw-rng.c
+++ b/hw/s390x/virtio-ccw-rng.c
@@ -24,9 +24,6 @@ static void virtio_ccw_rng_realize(VirtioCcwDevice *ccw_dev,
Error **errp)
if (!qdev_realize(vdev, BUS(&ccw_dev->bus), errp)) {
return;
}
-
- object_property_set_link(OBJECT(dev), "rng", OBJECT(dev->vdev.conf.rng),
- NULL);
}
static void virtio_ccw_rng_instance_init(Object *obj)
diff --git a/hw/virtio/virtio-crypto-pci.c b/hw/virtio/virtio-crypto-pci.c
index f1cc979d33..198f86e08c 100644
--- a/hw/virtio/virtio-crypto-pci.c
+++ b/hw/virtio/virtio-crypto-pci.c
@@ -57,8 +57,6 @@ static void virtio_crypto_pci_realize(VirtIOPCIProxy
*vpci_dev, Error **errp)
if (!qdev_realize(vdev, BUS(&vpci_dev->bus), errp)) {
return;
}
- object_property_set_link(OBJECT(vcrypto), "cryptodev",
- OBJECT(vcrypto->vdev.conf.cryptodev), NULL);
}
static void virtio_crypto_pci_class_init(ObjectClass *klass, void *data)
diff --git a/hw/virtio/virtio-rng-pci.c b/hw/virtio/virtio-rng-pci.c
index 2f0b529b62..8afbb4c209 100644
--- a/hw/virtio/virtio-rng-pci.c
+++ b/hw/virtio/virtio-rng-pci.c
@@ -38,9 +38,6 @@ static void virtio_rng_pci_realize(VirtIOPCIProxy *vpci_dev,
Error **errp)
if (!qdev_realize(vdev, BUS(&vpci_dev->bus), errp)) {
return;
}
-
- object_property_set_link(OBJECT(vrng), "rng", OBJECT(vrng->vdev.conf.rng),
- NULL);
}
static void virtio_rng_pci_class_init(ObjectClass *klass, void *data)
--
MST
- [PULL 0/9] acpi,virtio,pc: bugfixes, Michael S. Tsirkin, 2020/07/22
- [PULL 1/9] acpi: accept byte and word access to core ACPI registers, Michael S. Tsirkin, 2020/07/22
- [PULL 2/9] virtio: Drop broken and superfluous object_property_set_link(),
Michael S. Tsirkin <=
- [PULL 3/9] virtio-balloon: Prevent guest from starting a report when we didn't request one, Michael S. Tsirkin, 2020/07/22
- [PULL 4/9] virtio-balloon: Add locking to prevent possible race when starting hinting, Michael S. Tsirkin, 2020/07/22
- [PULL 5/9] virtio-balloon: Replace free page hinting references to 'report' with 'hint', Michael S. Tsirkin, 2020/07/22
- [PULL 6/9] virtio: list legacy-capable devices, Michael S. Tsirkin, 2020/07/22
- [PULL 7/9] virtio: verify that legacy support is not accidentally on, Michael S. Tsirkin, 2020/07/22
- [PULL 8/9] intel_iommu: Use correct shift for 256 bits qi descriptor, Michael S. Tsirkin, 2020/07/22
- [PULL 9/9] virtio-pci: Changed vdev to proxy for VirtIO PCI BAR callbacks., Michael S. Tsirkin, 2020/07/22
- Re: [PULL 0/9] acpi,virtio,pc: bugfixes, Peter Maydell, 2020/07/23