Message ID | 20210401092340.84447-1-fanwentao.0130@bytedance.com |
---|---|
State | New |
Headers | show |
Series | hw/virtio: remove redundant code | expand |
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) {