OSDN Git Service

hw/s390x/event-facility: Replace DO_UPCAST(SCLPEvent) by SCLP_EVENT()
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Sun, 12 Feb 2023 22:51:40 +0000 (23:51 +0100)
committerThomas Huth <thuth@redhat.com>
Tue, 14 Feb 2023 08:11:27 +0000 (09:11 +0100)
Use the SCLP_EVENT() QOM type-checking macro to avoid DO_UPCAST().

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230212225144.58660-16-philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
hw/s390x/event-facility.c

index faa51aa..6891e3c 100644 (file)
@@ -64,8 +64,7 @@ static bool event_pending(SCLPEventFacility *ef)
     SCLPEventClass *event_class;
 
     QTAILQ_FOREACH(kid, &ef->sbus.qbus.children, sibling) {
-        DeviceState *qdev = kid->child;
-        event = DO_UPCAST(SCLPEvent, qdev, qdev);
+        event = SCLP_EVENT(kid->child);
         event_class = SCLP_EVENT_GET_CLASS(event);
         if (event->event_pending &&
             event_class->get_send_mask() & ef->receive_mask) {