]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-blk: modify the value type of num in virtio_queue_rq()
authorYe Guojin <ye.guojin@zte.com.cn>
Wed, 17 Nov 2021 06:39:55 +0000 (06:39 +0000)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 25 Nov 2021 00:00:28 +0000 (19:00 -0500)
commit16c590de9a7d94c6a698032290d924f47b6730c9
tree55a5d45568f6fd7ae5fb7b122fa375772d3a9e52
parente73629a8609e1715f1e853208219af72c98b96ba
virtio-blk: modify the value type of num in virtio_queue_rq()

This was found by coccicheck:
./drivers/block/virtio_blk.c, 334, 14-17, WARNING Unsigned expression
compared with zero  num < 0

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Ye Guojin <ye.guojin@zte.com.cn>
Link: https://lore.kernel.org/r/20211117063955.160777-1-ye.guojin@zte.com.cn
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Fixes: 7806a016514c ("virtio-blk: avoid preallocating big SGL for data")
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
drivers/block/virtio_blk.c