mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
4c8a2054e7
commit
011da22c5c
|
@ -588,9 +588,10 @@ static void vfio_ccw_put_device(VFIOCCWDevice *vcdev)
|
||||||
static void vfio_ccw_get_device(VFIOGroup *group, VFIOCCWDevice *vcdev,
|
static void vfio_ccw_get_device(VFIOGroup *group, VFIOCCWDevice *vcdev,
|
||||||
Error **errp)
|
Error **errp)
|
||||||
{
|
{
|
||||||
char *name = g_strdup_printf("%x.%x.%04x", vcdev->cdev.hostid.cssid,
|
S390CCWDevice *cdev = S390_CCW_DEVICE(vcdev);
|
||||||
vcdev->cdev.hostid.ssid,
|
char *name = g_strdup_printf("%x.%x.%04x", cdev->hostid.cssid,
|
||||||
vcdev->cdev.hostid.devid);
|
cdev->hostid.ssid,
|
||||||
|
cdev->hostid.devid);
|
||||||
VFIODevice *vbasedev;
|
VFIODevice *vbasedev;
|
||||||
|
|
||||||
QLIST_FOREACH(vbasedev, &group->device_list, next) {
|
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;
|
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;
|
goto out_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue