qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wentao Fan <fanwentao.0130@bytedance.com>
To: qemu-devel@nongnu.org
Cc: jasowang@redhat.com, "Michael S. Tsirkin" <mst@redhat.com>,
	Fan Wentao <fanwentao.0130@bytedance.com>
Subject: [PATCH] hw/virtio: remove redundant code
Date: Thu,  1 Apr 2021 17:23:41 +0800	[thread overview]
Message-ID: <20210401092340.84447-1-fanwentao.0130@bytedance.com> (raw)

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)



             reply	other threads:[~2021-04-01 13:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01  9:23 Wentao Fan [this message]
2021-04-01 12:58 [PATCH] hw/virtio: remove redundant code Wentao Fan
2021-04-02  3:49 ` Jason Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210401092340.84447-1-fanwentao.0130@bytedance.com \
    --to=fanwentao.0130@bytedance.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).