]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
nvme-pci: Use size_t for length fields to handle larger sizes
authorLeon Romanovsky <leonro@nvidia.com>
Wed, 17 Dec 2025 09:41:23 +0000 (11:41 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 6 Jan 2026 12:47:54 +0000 (05:47 -0700)
commit073b9bf9af463d32555c5ebaf7e28c3a44c715d0
tree0e6da98a93f22950b14405f5c2c162ee3c8ace68
parentf8f9c1f4d0c7a64600e2ca312dec824a0bc2f1da
nvme-pci: Use size_t for length fields to handle larger sizes

This patch changes the length variables from unsigned int to size_t.
Using size_t ensures that we can handle larger sizes, as size_t is
always equal to or larger than the previously used u32 type.

Originally, u32 was used because blk-mq-dma code evolved from
scatter-gather implementation, which uses unsigned int to describe length.
This change will also allow us to reuse the existing struct phys_vec in places
that don't need scatter-gather.

Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-dma.c
drivers/nvme/host/pci.c