aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-12-11 17:05:20 -0500
committerEduardo Habkost <ehabkost@redhat.com>2020-12-18 15:20:17 -0500
commitea7c1e5c3ed0f138f67a7c26a4219827845eb545 (patch)
tree4b86d438ae00164ce52431f686602214b5439998 /target
parent7ed854af1401d62be9b232d4b67d8a75418e96b2 (diff)
downloadqemu-ea7c1e5c3ed0f138f67a7c26a4219827845eb545.zip
qemu-ea7c1e5c3ed0f138f67a7c26a4219827845eb545.tar.gz
qemu-ea7c1e5c3ed0f138f67a7c26a4219827845eb545.tar.bz2
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 'target')
-rw-r--r--target/sparc/cpu.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
index a1dc0f1..d8a8bb1 100644
--- a/target/sparc/cpu.c
+++ b/target/sparc/cpu.c
@@ -798,17 +798,11 @@ static void sparc_get_nwindows(Object *obj, Visitor *v, const char *name,
static void sparc_set_nwindows(Object *obj, Visitor *v, const char *name,
void *opaque, Error **errp)
{
- DeviceState *dev = DEVICE(obj);
const int64_t min = MIN_NWINDOWS;
const int64_t max = MAX_NWINDOWS;
SPARCCPU *cpu = SPARC_CPU(obj);
int64_t value;
- if (dev->realized) {
- qdev_prop_set_after_realize(dev, name, errp);
- return;
- }
-
if (!visit_type_int(v, name, &value, errp)) {
return;
}