diff mbox series

hw/virtio: remove redundant code

Message ID 20210401092340.84447-1-fanwentao.0130@bytedance.com
State New
Headers show
Series hw/virtio: remove redundant code | expand

Commit Message

Wentao Fan April 1, 2021, 9:23 a.m. UTC
From: Fan Wentao <fanwentao.0130@bytedance.com>

Signed-off-by: Wentao Fan <fanwentao.0130@bytedance.com>
---
 hw/virtio/virtio.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 07f4e60b30..aa5c283102 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -173,8 +173,7 @@  static void virtio_init_region_cache(VirtIODevice *vdev, int n)
     }
     new = g_new0(VRingMemoryRegionCaches, 1);
     size = virtio_queue_get_desc_size(vdev, n);
-    packed = virtio_vdev_has_feature(vq->vdev, VIRTIO_F_RING_PACKED) ?
-                                   true : false;
+    packed = virtio_vdev_has_feature(vq->vdev, VIRTIO_F_RING_PACKED);
     len = address_space_cache_init(&new->desc, vdev->dma_as,
                                    addr, size, packed);
     if (len < size) {