]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
virtio-vdpa: Drop redundant conversion to bool
authorXichao Zhao <zhao.xichao@vivo.com>
Mon, 18 Aug 2025 10:28:48 +0000 (18:28 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 1 Oct 2025 11:24:55 +0000 (07:24 -0400)
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>
drivers/virtio/virtio_vdpa.c

index 2464fa655f09425b9839955ed811bbcd40c6019b..f9a29045eca0deea1c2f706af1d3f27c118089e2 100644 (file)
@@ -176,7 +176,7 @@ virtio_vdpa_setup_vq(struct virtio_device *vdev, unsigned int index,
        if (ops->get_vq_num_min)
                min_num = ops->get_vq_num_min(vdpa);
 
-       may_reduce_num = (max_num == min_num) ? false : true;
+       may_reduce_num = (max_num != min_num);
 
        /* Create the vring */
        align = ops->get_vq_align(vdpa);