[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1610704825-17724-1-git-send-email-abaci-bugfix@linux.alibaba.com>
Date: Fri, 15 Jan 2021 18:00:25 +0800
From: Jiapeng Zhong <abaci-bugfix@...ux.alibaba.com>
To: mst@...hat.com
Cc: jasowang@...hat.com, virtualization@...ts.linux-foundation.org,
linux-kernel@...r.kernel.org,
Jiapeng Zhong <abaci-bugfix@...ux.alibaba.com>
Subject: [PATCH] virtio_ring: boolean values to a bool variable
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@...ux.alibaba.com>
Signed-off-by: Jiapeng Zhong <abaci-bugfix@...ux.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
Powered by blists - more mailing lists