OSDN Git Service

virtio_blk: use UINT_MAX instead of -1U
authorAngus Chen <angus.chen@jaguarmicro.com>
Thu, 10 Nov 2022 03:01:23 +0000 (11:01 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 28 Dec 2022 10:28:10 +0000 (05:28 -0500)
commitf4e468f708386ce5fa6878a7ef43a9818ceeaecf
treefd3aacda617f4fa446f37295f08b4c657b02fe5a
parentc070c1912a83432530cbb4271d5b9b11fa36b67a
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 <angus.chen@jaguarmicro.com>
Message-Id: <20221110030124.1986-1-angus.chen@jaguarmicro.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
drivers/block/virtio_blk.c