summaryrefslogtreecommitdiffstats
path: root/hw/s390x/s390-pci-bus.c
diff options
context:
space:
mode:
authorEduardo Habkost2020-12-11 23:05:20 +0100
committerEduardo Habkost2020-12-18 21:20:17 +0100
commitea7c1e5c3ed0f138f67a7c26a4219827845eb545 (patch)
tree4b86d438ae00164ce52431f686602214b5439998 /hw/s390x/s390-pci-bus.c
parentqdev: Wrap getters and setters in separate helpers (diff)
downloadqemu-ea7c1e5c3ed0f138f67a7c26a4219827845eb545.tar.gz
qemu-ea7c1e5c3ed0f138f67a7c26a4219827845eb545.tar.xz
qemu-ea7c1e5c3ed0f138f67a7c26a4219827845eb545.zip
qdev: Move dev->realized check to qdev_property_set()
Every single qdev property setter function manually checks dev->realized. We can just check dev->realized inside qdev_property_set() instead. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Acked-by: Paul Durrant <paul@xen.org> Message-Id: <20201211220529.2290218-24-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/s390x/s390-pci-bus.c')
-rw-r--r--hw/s390x/s390-pci-bus.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/hw/s390x/s390-pci-bus.c b/hw/s390x/s390-pci-bus.c
index 8b6be1197b..30511f620e 100644
--- a/hw/s390x/s390-pci-bus.c
+++ b/hw/s390x/s390-pci-bus.c
@@ -1338,16 +1338,10 @@ static void s390_pci_get_fid(Object *obj, Visitor *v, const char *name,
static void s390_pci_set_fid(Object *obj, Visitor *v, const char *name,
void *opaque, Error **errp)
{
- DeviceState *dev = DEVICE(obj);
S390PCIBusDevice *zpci = S390_PCI_DEVICE(obj);
Property *prop = opaque;
uint32_t *ptr = qdev_get_prop_ptr(obj, prop);
- if (dev->realized) {
- qdev_prop_set_after_realize(dev, name, errp);
- return;
- }
-
if (!visit_type_uint32(v, name, ptr, errp)) {
return;
}