qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/virtio: remove redundant code
@ 2021-04-01 12:58 Wentao Fan
  2021-04-02  3:49 ` Jason Wang
  0 siblings, 1 reply; 3+ messages in thread
From: Wentao Fan @ 2021-04-01 12:58 UTC (permalink / raw)
  To: qemu-devel; +Cc: jasowang, Michael S. Tsirkin, Fan Wentao

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 --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) {
-- 
2.24.3 (Apple Git-128)



^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [PATCH] hw/virtio: remove redundant code
@ 2021-04-01  9:23 Wentao Fan
  0 siblings, 0 replies; 3+ messages in thread
From: Wentao Fan @ 2021-04-01  9:23 UTC (permalink / raw)
  To: qemu-devel; +Cc: jasowang, Michael S. Tsirkin, Fan Wentao

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 --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) {
-- 
2.24.3 (Apple Git-128)



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-02  3:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 12:58 [PATCH] hw/virtio: remove redundant code Wentao Fan
2021-04-02  3:49 ` Jason Wang
  -- strict thread matches above, loose matches on Subject: below --
2021-04-01  9:23 Wentao Fan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).