Skip to content

Commit ed9f3ab

Browse files
Xichao Zhaomstsirkin
authored andcommitted
virtio-vdpa: Drop redundant conversion to bool
The result of integer comparison already evaluates to bool. No need for explicit conversion. Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com> Message-Id: <20250818102848.578875-1-zhao.xichao@vivo.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
1 parent 3fc3068 commit ed9f3ab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/virtio/virtio_vdpa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ virtio_vdpa_setup_vq(struct virtio_device *vdev, unsigned int index,
176176
if (ops->get_vq_num_min)
177177
min_num = ops->get_vq_num_min(vdpa);
178178

179-
may_reduce_num = (max_num == min_num) ? false : true;
179+
may_reduce_num = (max_num != min_num);
180180

181181
/* Create the vring */
182182
align = ops->get_vq_align(vdpa);

0 commit comments

Comments
 (0)