All of lore.kernel.org
 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

* Re: [PATCH] hw/virtio: remove redundant code
  2021-04-01 12:58 [PATCH] hw/virtio: remove redundant code Wentao Fan
@ 2021-04-02  3:49 ` Jason Wang
  0 siblings, 0 replies; 3+ messages in thread
From: Jason Wang @ 2021-04-02  3:49 UTC (permalink / raw)
  To: Wentao Fan, qemu-devel; +Cc: Michael S. Tsirkin


在 2021/4/1 下午8:58, Wentao Fan 写道:
> From: Fan Wentao <fanwentao.0130@bytedance.com>
>
> Signed-off-by: Wentao Fan <fanwentao.0130@bytedance.com>


Acked-by: Jason Wang <jasowang@redhat.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) {



^ permalink raw reply	[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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.