Skip to content

Commit f4e468f

Browse files
Angus Chenmstsirkin
authored andcommitted
virtio_blk: use UINT_MAX instead of -1U
We use UINT_MAX to limit max_discard_sectors in virtblk_probe, we can use UINT_MAX to limit max_hw_sectors for consistencies. No functional change intended. Signed-off-by: Angus Chen <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]>
1 parent c070c19 commit f4e468f

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
@@ -994,7 +994,7 @@ static int virtblk_probe(struct virtio_device *vdev)
994994
blk_queue_max_segments(q, sg_elems);
995995

996996
/* No real sector limit. */
997-
blk_queue_max_hw_sectors(q, -1U);
997+
blk_queue_max_hw_sectors(q, UINT_MAX);
998998

999999
max_size = virtio_max_dma_size(vdev);
10001000

0 commit comments

Comments
 (0)