linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@meta.com>
Cc: linux-block@vger.kernel.org, linux-nvme@lists.infradead.org,
	hch@lst.de, axboe@kernel.dk, joshi.k@samsung.com,
	Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCHv6 7/8] nvme-pci: create common sgl unmapping helper
Date: Wed, 13 Aug 2025 08:51:50 +0200	[thread overview]
Message-ID: <20250813065150.GA12473@lst.de> (raw)
In-Reply-To: <20250812135210.4172178-8-kbusch@meta.com>

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@lst.de>



  reply	other threads:[~2025-08-13  7:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-12 13:52 [PATCHv6 0/8] blk dma iter for integrity metadata Keith Busch
2025-08-12 13:52 ` [PATCHv6 1/8] blk-mq-dma: create blk_map_iter type Keith Busch
2025-08-12 16:24   ` Christoph Hellwig
2025-08-12 13:52 ` [PATCHv6 2/8] blk-mq-dma: provide the bio_vec array being iterated Keith Busch
2025-08-12 16:24   ` Christoph Hellwig
2025-08-12 13:52 ` [PATCHv6 3/8] blk-mq-dma: require unmap caller provide p2p map type Keith Busch
2025-08-12 13:52 ` [PATCHv6 4/8] blk-mq: remove REQ_P2PDMA flag Keith Busch
2025-08-12 13:52 ` [PATCHv6 5/8] blk-mq-dma: move common dma start code to a helper Keith Busch
2025-08-12 13:52 ` [PATCHv6 6/8] blk-mq-dma: add support for mapping integrity metadata Keith Busch
2025-08-13  6:50   ` Christoph Hellwig
2025-08-12 13:52 ` [PATCHv6 7/8] nvme-pci: create common sgl unmapping helper Keith Busch
2025-08-13  6:51   ` Christoph Hellwig [this message]
2025-08-12 13:52 ` [PATCHv6 8/8] nvme-pci: convert metadata mapping to dma iter Keith Busch
2025-08-13  6:52   ` Christoph Hellwig

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=20250813065150.GA12473@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=joshi.k@samsung.com \
    --cc=kbusch@kernel.org \
    --cc=kbusch@meta.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).