* [PATCH 1/1] PCI: replace chan->device->dev with dmaengine_get_provider_device()
@ 2026-11-03 21:29 Frank.Li
2026-11-03 21:31 ` sashiko-bot
2026-11-04 8:30 ` Andy Shevchenko
0 siblings, 2 replies; 3+ messages in thread
From: Frank.Li @ 2026-11-03 21:29 UTC (permalink / raw)
To: Manivannan Sadhasivam, Jeff Hugo, Krzysztof Wilczyński,
Kishon Vijay Abraham I, Frank Li, Bjorn Helgaas, Niklas Cassel,
Koichiro Den, Christian Bruel, Marco Crivellari, Andy Shevchenko,
open list:MHI BUS, open list:MHI BUS,
open list:PCI ENDPOINT SUBSYSTEM, open list
Cc: imx, vkoul, Frank Li
From: Frank Li <Frank.Li@nxp.com>
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
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
drivers/pci/endpoint/functions/pci-epf-mhi.c | 2 +-
drivers/pci/endpoint/functions/pci-epf-test.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c
index 78f1fb1a6b0c7..5677fcbfe44f7 100644
--- a/drivers/pci/endpoint/functions/pci-epf-mhi.c
+++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c
@@ -646,7 +646,7 @@ 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;
}
diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
index d4905aa8e4c01..fd63e423c4726 100644
--- a/drivers/pci/endpoint/functions/pci-epf-test.c
+++ b/drivers/pci/endpoint/functions/pci-epf-test.c
@@ -238,7 +238,7 @@ 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);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] PCI: replace chan->device->dev with dmaengine_get_provider_device()
2026-11-03 21:29 [PATCH 1/1] PCI: replace chan->device->dev with dmaengine_get_provider_device() Frank.Li
@ 2026-11-03 21:31 ` sashiko-bot
2026-11-04 8:30 ` Andy Shevchenko
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-11-03 21:31 UTC (permalink / raw)
To: Frank.Li, open list:PCI ENDPOINT SUBSYSTEM
> From: Frank Li <Frank.Li@nxp.com>
>
> 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
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261103212924.1780217-1-Frank.Li@oss.nxp.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] PCI: replace chan->device->dev with dmaengine_get_provider_device()
2026-11-03 21:29 [PATCH 1/1] PCI: replace chan->device->dev with dmaengine_get_provider_device() Frank.Li
2026-11-03 21:31 ` sashiko-bot
@ 2026-11-04 8:30 ` Andy Shevchenko
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2026-11-04 8:30 UTC (permalink / raw)
To: Frank.Li
Cc: Manivannan Sadhasivam, Jeff Hugo, Krzysztof Wilczyński,
Kishon Vijay Abraham I, Frank Li, Bjorn Helgaas, Niklas Cassel,
Koichiro Den, Christian Bruel, Marco Crivellari,
open list:MHI BUS, open list:MHI BUS,
open list:PCI ENDPOINT SUBSYSTEM, open list, imx, vkoul, Frank Li
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-04 8:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03 21:29 [PATCH 1/1] PCI: replace chan->device->dev with dmaengine_get_provider_device() Frank.Li
2026-11-03 21:31 ` sashiko-bot
2026-11-04 8:30 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox