[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/12] pc-bios/s390-ccw/virtio: Beautify the code for reading vir
From: |
Thomas Huth |
Subject: |
[PATCH 08/12] pc-bios/s390-ccw/virtio: Beautify the code for reading virtqueue configuration |
Date: |
Tue, 28 Jun 2022 15:10:28 +0200 |
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.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
pc-bios/s390-ccw/virtio.c | 5 ++---
1 file 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;
--
2.31.1
- [PATCH 00/12] s390-ccw bios fixes and clean-ups, Thomas Huth, 2022/06/28
- [PATCH 01/12] pc-bios/s390-ccw: Add a proper prototype for main(), Thomas Huth, 2022/06/28
- [PATCH 03/12] pc-bios/s390-ccw/bootmap: Improve the guessing logic in zipl_load_vblk(), Thomas Huth, 2022/06/28
- [PATCH 02/12] pc-bios/s390-ccw/virtio: Introduce a macro for the DASD block size, Thomas Huth, 2022/06/28
- [PATCH 05/12] pc-bios/s390-ccw/virtio-blkdev: Remove virtio_assume_scsi(), Thomas Huth, 2022/06/28
- [PATCH 04/12] pc-bios/s390-ccw/virtio-blkdev: Simplify/fix virtio_ipl_disk_is_valid(), Thomas Huth, 2022/06/28
- [PATCH 06/12] pc-bios/s390-ccw/virtio: Set missing status bits while initializing, Thomas Huth, 2022/06/28
- [PATCH 07/12] pc-bios/s390-ccw/virtio: Read device config after feature negotiation, Thomas Huth, 2022/06/28
- [PATCH 08/12] pc-bios/s390-ccw/virtio: Beautify the code for reading virtqueue configuration,
Thomas Huth <=
- [PATCH 09/12] pc-bios/s390-ccw: Split virtio-scsi code from virtio_blk_setup_device(), Thomas Huth, 2022/06/28
- [PATCH 10/12] pc-bios/s390-ccw/virtio-blkdev: Request the right feature bits, Thomas Huth, 2022/06/28
- [PATCH 11/12] pc-bios/s390-ccw/virtio: Remove "extern" keyword from prototypes, Thomas Huth, 2022/06/28
- [PATCH 12/12] pc-bios/s390-ccw/netboot.mak: Ignore Clang's warnings about GNU extensions, Thomas Huth, 2022/06/28