diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-02-13 18:01:42 +0100 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2023-02-27 09:15:38 +0100 |
commit | 011da22c5c53910239e7c13394bdeca90c729b09 (patch) | |
tree | c850e88c949c045f179550a7942a0074e0b76a0c /hw/vfio | |
parent | 4c8a2054e78780622f5d005a52e0bc000f87eb93 (diff) | |
download | qemu-011da22c5c53910239e7c13394bdeca90c729b09.zip qemu-011da22c5c53910239e7c13394bdeca90c729b09.tar.gz qemu-011da22c5c53910239e7c13394bdeca90c729b09.tar.bz2 |
hw/vfio/ccw: Use intermediate S390CCWDevice variable
'cdev' is VFIOCCWDevice's private parent object.
Access it using the S390_CCW_DEVICE() QOM macro.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Message-Id: <20230213170145.45666-4-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'hw/vfio')
-rw-r--r-- | hw/vfio/ccw.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index 503de94..2c20e3c 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -588,9 +588,10 @@ static void vfio_ccw_put_device(VFIOCCWDevice *vcdev) static void vfio_ccw_get_device(VFIOGroup *group, VFIOCCWDevice *vcdev, Error **errp) { - char *name = g_strdup_printf("%x.%x.%04x", vcdev->cdev.hostid.cssid, - vcdev->cdev.hostid.ssid, - vcdev->cdev.hostid.devid); + S390CCWDevice *cdev = S390_CCW_DEVICE(vcdev); + char *name = g_strdup_printf("%x.%x.%04x", cdev->hostid.cssid, + cdev->hostid.ssid, + cdev->hostid.devid); VFIODevice *vbasedev; QLIST_FOREACH(vbasedev, &group->device_list, next) { @@ -611,7 +612,7 @@ static void vfio_ccw_get_device(VFIOGroup *group, VFIOCCWDevice *vcdev, */ vcdev->vdev.ram_block_discard_allowed = true; - if (vfio_get_device(group, vcdev->cdev.mdevid, &vcdev->vdev, errp)) { + if (vfio_get_device(group, cdev->mdevid, &vcdev->vdev, errp)) { goto out_err; } |