Blame SOURCES/kvm-pc-bios-s390-ccw-virtio-Beautify-the-code-for-readin.patch

29b115
From 430e76fd964390db86c8486f76b916a1cf7f74c2 Mon Sep 17 00:00:00 2001
29b115
From: Thomas Huth <thuth@redhat.com>
29b115
Date: Fri, 8 Jul 2022 20:49:01 +0200
29b115
Subject: [PATCH 12/17] pc-bios/s390-ccw/virtio: Beautify the code for reading
29b115
 virtqueue configuration
29b115
29b115
RH-Author: Thomas Huth <thuth@redhat.com>
29b115
RH-MergeRequest: 106: pc-bios/s390-ccw: Fix boot from disks with 4k sectors that do not have the typical DASD geometry
29b115
RH-Commit: [7/10] b15c06b4c5431837672b6cb5d57d09da20718441 (thuth/qemu-kvm-cs9)
29b115
RH-Bugzilla: 2098077
29b115
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
29b115
RH-Acked-by: David Hildenbrand <david@redhat.com>
29b115
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
29b115
29b115
Bugzilla: http://bugzilla.redhat.com/2098077
29b115
29b115
commit 070824885741f5d2a66626d3c4ecb2773c8e0552
29b115
Author: Thomas Huth <thuth@redhat.com>
29b115
Date:   Mon Jul 4 13:18:59 2022 +0200
29b115
29b115
    pc-bios/s390-ccw/virtio: Beautify the code for reading virtqueue configuration
29b115
29b115
    It looks nicer if we separate the run_ccw() from the IPL_assert()
29b115
    statement, and the error message should talk about "virtio device"
29b115
    instead of "block device", since this code is nowadays used for
29b115
    non-block (i.e. network) devices, too.
29b115
29b115
    Message-Id: <20220704111903.62400-9-thuth@redhat.com>
29b115
    Reviewed-by: Cornelia Huck <cohuck@redhat.com>
29b115
    Reviewed-by: Eric Farman <farman@linux.ibm.com>
29b115
    Signed-off-by: Thomas Huth <thuth@redhat.com>
29b115
29b115
Signed-off-by: Thomas Huth <thuth@redhat.com>
29b115
---
29b115
 pc-bios/s390-ccw/virtio.c | 5 ++---
29b115
 1 file changed, 2 insertions(+), 3 deletions(-)
29b115
29b115
diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c
29b115
index d8c2b52710..f37510f312 100644
29b115
--- a/pc-bios/s390-ccw/virtio.c
29b115
+++ b/pc-bios/s390-ccw/virtio.c
29b115
@@ -289,9 +289,8 @@ void virtio_setup_ccw(VDev *vdev)
29b115
             .num = 0,
29b115
         };
29b115
 
29b115
-        IPL_assert(
29b115
-            run_ccw(vdev, CCW_CMD_READ_VQ_CONF, &config, sizeof(config), false) == 0,
29b115
-            "Could not get block device VQ configuration");
29b115
+        rc = run_ccw(vdev, CCW_CMD_READ_VQ_CONF, &config, sizeof(config), false);
29b115
+        IPL_assert(rc == 0, "Could not get virtio device VQ configuration");
29b115
         info.num = config.num;
29b115
         vring_init(&vdev->vrings[i], &info;;
29b115
         vdev->vrings[i].schid = vdev->schid;
29b115
-- 
29b115
2.31.1
29b115