[PATCH 5/9] nvme-pci: merge the simple PRP and SGL setup into a common helper

Keith Busch kbusch at kernel.org
Wed Jun 11 14:03:35 PDT 2025


On Tue, Jun 10, 2025 at 07:06:43AM +0200, Christoph Hellwig wrote:
> -	iod->dma_len = bv->bv_len;
> +		iod->cmd.common.dptr.prp1 = cpu_to_le64(dma_addr);
> +		iod->cmd.common.dptr.prp2 = 0;
> +		if (bv.bv_len > first_prp_len)
> +			iod->cmd.common.dptr.prp2 =
> +				cpu_to_le64(dma_addr + first_prp_len);

Nit, set prp2 to 0 in an 'else' case instead of unconditionally before
overwriting it?

Otherwise looks good.



More information about the Linux-nvme mailing list