diff mbox series

[PULL,06/33] hw/vfio/ccw: Remove pointless S390CCWDevice variable

Message ID 20230227113621.58468-7-thuth@redhat.com
State New
Headers show
Series [PULL,01/33] tests/qtest/rtl8139-test: Make the test less verbose by default | expand

Commit Message

Thomas Huth Feb. 27, 2023, 11:35 a.m. UTC
From: Philippe Mathieu-Daudé <philmd@linaro.org>

QOM parenthood relationship is:

  VFIOCCWDevice -> S390CCWDevice -> CcwDevice -> DeviceState

No need to double-cast, call CCW_DEVICE() on VFIOCCWDevice.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Message-Id: <20230213170145.45666-6-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/vfio/ccw.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
index 2ea7b4a63c..cd66b66742 100644
--- a/hw/vfio/ccw.c
+++ b/hw/vfio/ccw.c
@@ -314,8 +314,7 @@  static void vfio_ccw_io_notifier_handler(void *opaque)
 {
     VFIOCCWDevice *vcdev = opaque;
     struct ccw_io_region *region = vcdev->io_region;
-    S390CCWDevice *cdev = S390_CCW_DEVICE(vcdev);
-    CcwDevice *ccw_dev = CCW_DEVICE(cdev);
+    CcwDevice *ccw_dev = CCW_DEVICE(vcdev);
     SubchDev *sch = ccw_dev->sch;
     SCHIB *schib = &sch->curr_status;
     SCSW s;