[PATCHv6 7/8] nvme-pci: create common sgl unmapping helper
Christoph Hellwig
hch at lst.de
Tue Aug 12 23:51:50 PDT 2025
On Tue, Aug 12, 2025 at 06:52:09AM -0700, Keith Busch wrote:
> +static void nvme_free_sgls(struct request *req)
> +{
> + struct nvme_iod *iod = blk_mq_rq_to_pdu(req);
> + struct nvme_sgl_desc *sg_list = iod->descriptors[0];
> + struct nvme_sgl_desc *sge = &iod->cmd.common.dptr.sgl;
> +
> + __nvme_free_sgls(req, sge, sg_list);
No real need for the local variables for sg_list and sge.
And I'd just kill this function and rename __nvme_free_sgls to
nvme_free_sgls. But if you think that's just noise right now I'd
be happy to do a clean up pass later.
Reviewed-by: Christoph Hellwig <hch at lst.de>
More information about the Linux-nvme
mailing list