public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
To: mst@redhat.com
Cc: jasowang@redhat.com, virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org,
	Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
Subject: [PATCH] virtio_ring: boolean values to a bool variable
Date: Fri, 15 Jan 2021 18:00:25 +0800	[thread overview]
Message-ID: <1610704825-17724-1-git-send-email-abaci-bugfix@linux.alibaba.com> (raw)

Fix the following coccicheck warnings:

./drivers/virtio/virtio_ring.c:1637:1-29: WARNING: Assignment of
0/1 to bool variable.

./drivers/virtio/virtio_ring.c:1636:1-30: WARNING: Assignment of
0/1 to bool variable.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@linux.alibaba.com>
---
 drivers/virtio/virtio_ring.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 71e16b5..5adb361 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -1633,8 +1633,8 @@ static struct virtqueue *vring_create_virtqueue_packed(
 	vq->packed.vring.device = device;
 
 	vq->packed.next_avail_idx = 0;
-	vq->packed.avail_wrap_counter = 1;
-	vq->packed.used_wrap_counter = 1;
+	vq->packed.avail_wrap_counter = true;
+	vq->packed.used_wrap_counter = true;
 	vq->packed.event_flags_shadow = 0;
 	vq->packed.avail_used_flags = 1 << VRING_PACKED_DESC_F_AVAIL;
 
-- 
1.8.3.1


             reply	other threads:[~2021-01-15 10:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-15 10:00 Jiapeng Zhong [this message]
2021-01-18  2:57 ` [PATCH] virtio_ring: boolean values to a bool variable Jason Wang
2021-05-03  8:17   ` Michael S. Tsirkin

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=1610704825-17724-1-git-send-email-abaci-bugfix@linux.alibaba.com \
    --to=abaci-bugfix@linux.alibaba.com \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=virtualization@lists.linux-foundation.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