summaryrefslogtreecommitdiffstats
path: root/pc-bios
diff options
context:
space:
mode:
authorThomas Huth2022-07-04 13:18:59 +0200
committerThomas Huth2022-07-06 18:35:00 +0200
commit070824885741f5d2a66626d3c4ecb2773c8e0552 (patch)
tree78e335a6ea619b6894fbe2ed63dbddfbfc73b5d9 /pc-bios
parentpc-bios/s390-ccw/virtio: Read device config after feature negotiation (diff)
downloadqemu-070824885741f5d2a66626d3c4ecb2773c8e0552.tar.gz
qemu-070824885741f5d2a66626d3c4ecb2773c8e0552.tar.xz
qemu-070824885741f5d2a66626d3c4ecb2773c8e0552.zip
pc-bios/s390-ccw/virtio: Beautify the code for reading virtqueue configuration
It looks nicer if we separate the run_ccw() from the IPL_assert() statement, and the error message should talk about "virtio device" instead of "block device", since this code is nowadays used for non-block (i.e. network) devices, too. Message-Id: <20220704111903.62400-9-thuth@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Eric Farman <farman@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'pc-bios')
-rw-r--r--pc-bios/s390-ccw/virtio.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c
index d8c2b52710..f37510f312 100644
--- a/pc-bios/s390-ccw/virtio.c
+++ b/pc-bios/s390-ccw/virtio.c
@@ -289,9 +289,8 @@ void virtio_setup_ccw(VDev *vdev)
.num = 0,
};
- IPL_assert(
- run_ccw(vdev, CCW_CMD_READ_VQ_CONF, &config, sizeof(config), false) == 0,
- "Could not get block device VQ configuration");
+ rc = run_ccw(vdev, CCW_CMD_READ_VQ_CONF, &config, sizeof(config), false);
+ IPL_assert(rc == 0, "Could not get virtio device VQ configuration");
info.num = config.num;
vring_init(&vdev->vrings[i], &info);
vdev->vrings[i].schid = vdev->schid;