diff options
| author | Angus Chen <[email protected]> | 2022-11-10 11:01:23 +0800 |
|---|---|---|
| committer | Michael S. Tsirkin <[email protected]> | 2022-12-28 05:28:10 -0500 |
| commit | f4e468f708386ce5fa6878a7ef43a9818ceeaecf (patch) | |
| tree | fd3aacda617f4fa446f37295f08b4c657b02fe5a | |
| parent | c070c1912a83432530cbb4271d5b9b11fa36b67a (diff) | |
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]>
| -rw-r--r-- | drivers/block/virtio_blk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 271a9878fa8b..dcbf86cd2155 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -994,7 +994,7 @@ static int virtblk_probe(struct virtio_device *vdev) blk_queue_max_segments(q, sg_elems); /* No real sector limit. */ - blk_queue_max_hw_sectors(q, -1U); + blk_queue_max_hw_sectors(q, UINT_MAX); max_size = virtio_max_dma_size(vdev); |