Commit 0466a39b authored by Ye Guojin's avatar Ye Guojin Committed by Michael S. Tsirkin

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: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarYe Guojin <ye.guojin@zte.com.cn>
Link: https://lore.kernel.org/r/20211117063955.160777-1-ye.guojin@zte.com.cnSigned-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Fixes: 02746e26 ("virtio-blk: avoid preallocating big SGL for data")
Reviewed-by: default avatarStefano Garzarella <sgarzare@redhat.com>
Reviewed-by: default avatarMax Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
parent 11708ff9
......@@ -316,7 +316,7 @@ static blk_status_t virtio_queue_rq(struct blk_mq_hw_ctx *hctx,
struct request *req = bd->rq;
struct virtblk_req *vbr = blk_mq_rq_to_pdu(req);
unsigned long flags;
unsigned int num;
int num;
int qid = hctx->queue_num;
bool notify = false;
blk_status_t status;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment