[PATCH 1/2] nvme-pci: Use size_t for length fields to handle larger sizes
Chaitanya Kulkarni
chaitanyak at nvidia.com
Sat Nov 15 14:25:00 PST 2025
On 11/15/25 08:22, Leon Romanovsky wrote:
> From: Leon Romanovsky<leonro at nvidia.com>
>
> 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 at nvidia.com>
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch at nvidia.com>
-ck
More information about the Linux-nvme
mailing list