From: Pranjal Shrivastava <praan@google.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
Leon Romanovsky <leon@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Lu Baolu <baolu.lu@linux.intel.com>,
Luis Chamberlain <mcgrof@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Logan Gunthorpe <logang@deltatee.com>,
Christoph Hellwig <hch@lst.de>,
Li RongQing <lirongqing@baidu.com>
Subject: Re: [PATCH] dma-direct: Improve readability of the dma_direct_map_sg() for P2PDMA case
Date: Tue, 14 Jul 2026 07:37:15 +0000 [thread overview]
Message-ID: <alXnK76_Bgf4DEks@google.com> (raw)
In-Reply-To: <20260713083022.1110993-1-m.szyprowski@samsung.com>
On Mon, Jul 13, 2026 at 10:30:22AM +0200, Marek Szyprowski wrote:
> Improve readability of the sg_dma_len assignment in the P2PDMA cases by
> removing duplicated code, which was a direct result of the d0d08f4bd7f6
> ("dma-direct: Fix missing sg_dma_len assignment in P2PDMA bus mappings")
> fix. No functional change.
>
> Suggested-by: Leon Romanovsky <leon@kernel.org>
> Link: https://lore.kernel.org/all/20260604071856.GA245424@unreal/
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> kernel/dma/direct.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c
> index 4391b797d4db..d8219efe3273 100644
> --- a/kernel/dma/direct.c
> +++ b/kernel/dma/direct.c
> @@ -486,15 +486,14 @@ int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl, int nents,
> goto out_unmap;
> }
> break;
> case PCI_P2PDMA_MAP_BUS_ADDR:
> sg->dma_address = pci_p2pdma_bus_addr_map(
> p2pdma_state.mem, sg_phys(sg));
> - sg_dma_len(sg) = sg->length;
> sg_dma_mark_bus_address(sg);
> - continue;
> + break;
> default:
> ret = -EREMOTEIO;
> goto out_unmap;
> }
> sg_dma_len(sg) = sg->length;
> }
Reviewed-by: Pranjal Shrivastava <praan@google.com>
Thanks,
Praan
prev parent reply other threads:[~2026-07-14 7:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20260713083036eucas1p12b33a500ff4fef0b5d8db94f694bdb24@eucas1p1.samsung.com>
2026-07-13 8:30 ` [PATCH] dma-direct: Improve readability of the dma_direct_map_sg() for P2PDMA case Marek Szyprowski
2026-07-13 9:37 ` Leon Romanovsky
2026-07-13 15:47 ` Logan Gunthorpe
2026-07-14 6:03 ` Marek Szyprowski
2026-07-14 7:37 ` Pranjal Shrivastava [this message]
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=alXnK76_Bgf4DEks@google.com \
--to=praan@google.com \
--cc=baolu.lu@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux.dev \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lirongqing@baidu.com \
--cc=logang@deltatee.com \
--cc=m.szyprowski@samsung.com \
--cc=mcgrof@kernel.org \
--cc=robin.murphy@arm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.