From: Angus Chen <angus.chen@jaguarmicro.com>
To: jasowang@redhat.com, mst@redhat.com, axboe@kernel.dk
Cc: virtualization@lists.linux-foundation.org,
linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
pbonzini@redhat.com, stefanha@redhat.com,
Angus Chen <angus.chen@jaguarmicro.com>
Subject: [PATCH] virtio_blk: use UINT_MAX instead of -1U
Date: Thu, 10 Nov 2022 11:01:23 +0800 [thread overview]
Message-ID: <20221110030124.1986-1-angus.chen@jaguarmicro.com> (raw)
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
next reply other threads:[~2022-11-10 3:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-10 3:01 Angus Chen [this message]
2022-11-10 20:18 ` [PATCH] virtio_blk: use UINT_MAX instead of -1U Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221110030124.1986-1-angus.chen@jaguarmicro.com \
--to=angus.chen@jaguarmicro.com \
--cc=axboe@kernel.dk \
--cc=jasowang@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=stefanha@redhat.com \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox