[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 1/6] hw/s390x/event-facility: Replace DO_UPCAST(SCLPEvent) by
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 1/6] hw/s390x/event-facility: Replace DO_UPCAST(SCLPEvent) by SCLP_EVENT() |
Date: |
Mon, 13 Feb 2023 18:01:40 +0100 |
Use the SCLP_EVENT() QOM type-checking macro to avoid DO_UPCAST().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
---
hw/s390x/event-facility.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c
index faa51aa4c7..6891e3cd73 100644
--- a/hw/s390x/event-facility.c
+++ b/hw/s390x/event-facility.c
@@ -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) {
--
2.38.1
- [PATCH v3 0/6] hw/vfio/ccw: hw: Use QOM macros and remove DO_UPCAST() uses, Philippe Mathieu-Daudé, 2023/02/13
- [PATCH v3 5/6] hw/vfio/ccw: Remove pointless S390CCWDevice variable, Philippe Mathieu-Daudé, 2023/02/13
- [PATCH v3 4/6] hw/vfio/ccw: Replace DO_UPCAST(S390CCWDevice) by S390_CCW_DEVICE(), Philippe Mathieu-Daudé, 2023/02/13
- [PATCH v3 6/6] hw/vfio/ccw: Replace DO_UPCAST(VFIOCCWDevice) by VFIO_CCW(), Philippe Mathieu-Daudé, 2023/02/13
- [PATCH v3 1/6] hw/s390x/event-facility: Replace DO_UPCAST(SCLPEvent) by SCLP_EVENT(),
Philippe Mathieu-Daudé <=
- [PATCH v3 3/6] hw/vfio/ccw: Use intermediate S390CCWDevice variable, Philippe Mathieu-Daudé, 2023/02/13
- [PATCH v3 2/6] hw/vfio/ccw: Simplify using DEVICE() macro, Philippe Mathieu-Daudé, 2023/02/13
- Re: [PATCH v3 0/6] hw/vfio/ccw: hw: Use QOM macros and remove DO_UPCAST() uses, Philippe Mathieu-Daudé, 2023/02/27