[PULL 14/56] target/s390x: Use qdev_is_realized()
Philippe Mathieu-Daudé <[email protected]>
| Newsgroups | org.nongnu.qemu-devel |
|---|---|
| Message-ID | <[email protected]> |
From: Akihiko Odaki <[email protected]> DeviceState fields should be accessed through qdev helpers rather than directly. Use qdev_is_realized() instead of reading DeviceState::realized directly. Signed-off-by: Akihiko Odaki <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Message-ID: <[email protected]> --- target/s390x/cpu_models.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 2dd9aac8078..f292af7ad01 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -714,7 +714,7 @@ static void set_feature(Object *obj, Visitor *v, const char *name, S390CPU *cpu = S390_CPU(obj); bool value; - if (dev->realized) { + if (qdev_is_realized(dev)) { error_setg(errp, "Attempt to set property '%s' on '%s' after " "it was realized", name, object_get_typename(obj)); return; @@ -770,7 +770,7 @@ static void set_feature_group(Object *obj, Visitor *v, const char *name, S390CPU *cpu = S390_CPU(obj); bool value; - if (dev->realized) { + if (qdev_is_realized(dev)) { error_setg(errp, "Attempt to set property '%s' on '%s' after " "it was realized", name, object_get_typename(obj)); return; -- 2.53.0