Skip to content

Commit 0466a39

Browse files
Ye Guojinmstsirkin
authored andcommitted
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 <[email protected]> Signed-off-by: Ye Guojin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael S. Tsirkin <[email protected]> Fixes: 02746e2 ("virtio-blk: avoid preallocating big SGL for data") Reviewed-by: Stefano Garzarella <[email protected]> Reviewed-by: Max Gurtovoy <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]>
1 parent 11708ff commit 0466a39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/block/virtio_blk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ static blk_status_t virtio_queue_rq(struct blk_mq_hw_ctx *hctx,
316316
struct request *req = bd->rq;
317317
struct virtblk_req *vbr = blk_mq_rq_to_pdu(req);
318318
unsigned long flags;
319-
unsigned int num;
319+
int num;
320320
int qid = hctx->queue_num;
321321
bool notify = false;
322322
blk_status_t status;

0 commit comments

Comments
 (0)