target/s390x: Use qdev_is_realized()
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 <odaki@rsg.ci.i.u-tokyo.ac.jp> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Message-ID: <20260721-qdev-v3-13-d2e226fa002e@rsg.ci.i.u-tokyo.ac.jp>
Akihiko Odaki committed
Jul 21, 2026 at 17:17 UTC
72422beb01001241e8425677e455c4a4c8274549
1 file changed
+2
-2
target/s390x/cpu_models.c
+2
-2
@@ -714,7 +714,7 @@ static void set_feature(Object *obj, Visitor *v, const char *name,
714
S390CPU *cpu = S390_CPU(obj);
715
bool value;
716
717
- if (dev->realized) {
717
+ if (qdev_is_realized(dev)) {
718
error_setg(errp, "Attempt to set property '%s' on '%s' after "
719
"it was realized", name, object_get_typename(obj));
720
return;
@@ -770,7 +770,7 @@ static void set_feature_group(Object *obj, Visitor *v, const char *name,
770
S390CPU *cpu = S390_CPU(obj);
771
bool value;
772
773
- if (dev->realized) {
773
+ if (qdev_is_realized(dev)) {
774
error_setg(errp, "Attempt to set property '%s' on '%s' after "
775
"it was realized", name, object_get_typename(obj));
776
return;