From: Philippe Mathieu-Daudé Date: Wed, 14 Feb 2024 08:17:39 +0000 (+0100) Subject: hw/ppc/spapr_cpu: Use qdev_is_realized() instead of QOM API X-Git-Tag: v9.0.0-rc0~53^2~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1f88173ab9dfa34e96f5baa10b83ccb528de3030;p=thirdparty%2Fqemu.git hw/ppc/spapr_cpu: Use qdev_is_realized() instead of QOM API Prefer QDev API for QDev objects, avoid the underlying QOM layer. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Zhao Liu Message-Id: <20240216110313.17039-4-philmd@linaro.org> --- diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index 0c0fb3f1b04..40b7c52f7ff 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c @@ -245,8 +245,7 @@ static void spapr_cpu_core_unrealize(DeviceState *dev) * spapr_cpu_core_realize(), make sure we only unrealize * vCPUs that have already been realized. */ - if (object_property_get_bool(OBJECT(sc->threads[i]), "realized", - &error_abort)) { + if (qdev_is_realized(DEVICE(sc->threads[i]))) { spapr_unrealize_vcpu(sc->threads[i], sc); } spapr_delete_vcpu(sc->threads[i]);