* [PATCH] virtio_blk: use UINT_MAX instead of -1U
@ 2022-11-10 3:01 Angus Chen
2022-11-10 20:18 ` Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Angus Chen @ 2022-11-10 3:01 UTC (permalink / raw)
To: jasowang, mst, axboe
Cc: virtualization, linux-kernel, linux-block, pbonzini, stefanha,
Angus Chen
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>
---
drivers/block/virtio_blk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 19da5defd734..02d3027dd32d 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -991,7 +991,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);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] virtio_blk: use UINT_MAX instead of -1U
2022-11-10 3:01 [PATCH] virtio_blk: use UINT_MAX instead of -1U Angus Chen
@ 2022-11-10 20:18 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2022-11-10 20:18 UTC (permalink / raw)
To: Angus Chen
Cc: jasowang, mst, axboe, virtualization, linux-kernel, linux-block,
pbonzini
[-- Attachment #1: Type: text/plain, Size: 442 bytes --]
On Thu, Nov 10, 2022 at 11:01:23AM +0800, Angus Chen wrote:
> 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>
> ---
> drivers/block/virtio_blk.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-10 20:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-10 3:01 [PATCH] virtio_blk: use UINT_MAX instead of -1U Angus Chen
2022-11-10 20:18 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox