From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Frank.Li@oss.nxp.com
Cc: "Manivannan Sadhasivam" <mani@kernel.org>,
"Jeff Hugo" <jeff.hugo@oss.qualcomm.com>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Kishon Vijay Abraham I" <kishon@kernel.org>,
"Frank Li" <Frank.Li@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Niklas Cassel" <cassel@kernel.org>,
"Koichiro Den" <den@valinux.co.jp>,
"Christian Bruel" <christian.bruel@foss.st.com>,
"Marco Crivellari" <marco.crivellari@suse.com>,
"open list:MHI BUS" <mhi@lists.linux.dev>,
"open list:MHI BUS" <linux-arm-msm@vger.kernel.org>,
"open list:PCI ENDPOINT SUBSYSTEM" <linux-pci@vger.kernel.org>,
"open list" <linux-kernel@vger.kernel.org>,
imx@lists.linux.dev, vkoul@kernel.org,
"Frank Li" <Frank.Li@nxp.com>
Subject: Re: [PATCH 1/1] PCI: replace chan->device->dev with dmaengine_get_provider_device()
Date: Wed, 4 Nov 2026 10:30:14 +0200 [thread overview]
Message-ID: <aurtFju8dyFbRROh@ashevche-desk.local> (raw)
In-Reply-To: <20261103212924.1780217-1-Frank.Li@oss.nxp.com>
On Tue, Nov 03, 2026 at 04:29:20PM -0500, Frank.Li@oss.nxp.com wrote:
>
> Use the dmaengine_get_provider_device() API instead of directly
> accessing chan->device->dev to get the DMA provider device.
>
> No functional change. Prepare make to struct dma_device private to the DMA
> engine.
...
> Assisted-by: LLM
It's an obsolete tag. Please, replace it in a free-form explanation how AI was
used in the comment block, below '---' line.
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
...
> static bool pci_epf_mhi_filter(struct dma_chan *chan, void *node)
> memset(&caps, 0, sizeof(caps));
> dma_get_slave_caps(chan, &caps);
>
> - return chan->device->dev == filter->dev && filter->dma_mask &
> + return dmaengine_get_provider_device(chan) == filter->dev && filter->dma_mask &
> caps.directions;
While at it, fix indentation:
return dmaengine_get_provider_device(chan) == filter->dev &&
(filter->dma_mask & caps.directions);
...
> static bool epf_dma_filter_fn(struct dma_chan *chan, void *node)
> memset(&caps, 0, sizeof(caps));
> dma_get_slave_caps(chan, &caps);
>
> - return chan->device->dev == filter->dev
> + return dmaengine_get_provider_device(chan) == filter->dev
> && (filter->dma_mask & caps.directions);
Ditto.
return dmaengine_get_provider_device(chan) == filter->dev &&
(filter->dma_mask & caps.directions);
...
Looking more at it, you probably want to deduplicate this code at some point.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-11-04 8:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 21:29 Frank.Li
2026-11-04 8:30 ` Andy Shevchenko [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=aurtFju8dyFbRROh@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=Frank.Li@kernel.org \
--cc=Frank.Li@nxp.com \
--cc=Frank.Li@oss.nxp.com \
--cc=bhelgaas@google.com \
--cc=cassel@kernel.org \
--cc=christian.bruel@foss.st.com \
--cc=den@valinux.co.jp \
--cc=imx@lists.linux.dev \
--cc=jeff.hugo@oss.qualcomm.com \
--cc=kishon@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mani@kernel.org \
--cc=marco.crivellari@suse.com \
--cc=mhi@lists.linux.dev \
--cc=vkoul@kernel.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
all inboxes | Powered by JetHome®