[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/33] hw/vfio/ccw: Simplify using DEVICE() macro
From: |
Thomas Huth |
Subject: |
[PULL 03/33] hw/vfio/ccw: Simplify using DEVICE() macro |
Date: |
Mon, 27 Feb 2023 12:35:51 +0100 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
QOM parenthood relationship is:
VFIOCCWDevice -> S390CCWDevice -> CcwDevice -> DeviceState
We can directly use the QOM DEVICE() macro to get the parent object.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Message-Id: <20230213170145.45666-3-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
hw/vfio/ccw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
index 0354737666..503de94ce1 100644
--- a/hw/vfio/ccw.c
+++ b/hw/vfio/ccw.c
@@ -618,7 +618,7 @@ static void vfio_ccw_get_device(VFIOGroup *group,
VFIOCCWDevice *vcdev,
vcdev->vdev.ops = &vfio_ccw_ops;
vcdev->vdev.type = VFIO_DEVICE_TYPE_CCW;
vcdev->vdev.name = name;
- vcdev->vdev.dev = &vcdev->cdev.parent_obj.parent_obj;
+ vcdev->vdev.dev = DEVICE(vcdev);
return;
--
2.31.1
- [PULL 00/33] s390x and testing related patches, Thomas Huth, 2023/02/27
- [PULL 03/33] hw/vfio/ccw: Simplify using DEVICE() macro,
Thomas Huth <=
- [PULL 02/33] Do not include hw/hw.h if it is not necessary, Thomas Huth, 2023/02/27
- [PULL 05/33] hw/vfio/ccw: Replace DO_UPCAST(S390CCWDevice) by S390_CCW_DEVICE(), Thomas Huth, 2023/02/27
- [PULL 06/33] hw/vfio/ccw: Remove pointless S390CCWDevice variable, Thomas Huth, 2023/02/27
- [PULL 04/33] hw/vfio/ccw: Use intermediate S390CCWDevice variable, Thomas Huth, 2023/02/27
- [PULL 01/33] tests/qtest/rtl8139-test: Make the test less verbose by default, Thomas Huth, 2023/02/27
- [PULL 07/33] hw/vfio/ccw: Replace DO_UPCAST(VFIOCCWDevice) by VFIO_CCW(), Thomas Huth, 2023/02/27
- [PULL 08/33] target/s390x/arch_dump: Fix memory corruption in s390x_write_elf64_notes(), Thomas Huth, 2023/02/27
- [PULL 09/33] target/s390x/arch_dump: Simplify memory allocation in s390x_write_elf64_notes(), Thomas Huth, 2023/02/27
- [PULL 12/33] target/s390x: Use void* for haddr in S390Access, Thomas Huth, 2023/02/27
- [PULL 14/33] target/s390x: Remove TLB_NOTDIRTY workarounds, Thomas Huth, 2023/02/27