Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/1] nvmet: replace chan->device->dev with dmaengine_get_provider_device()
@ 2026-11-30 16:54 Frank.Li
  2026-11-30 16:58 ` Niklas Cassel
  0 siblings, 1 reply; 2+ messages in thread
From: Frank.Li @ 2026-11-30 16:54 UTC (permalink / raw)
  To: Christoph Hellwig, Sagi Grimberg, Chaitanya Kulkarni,
	open list:NVM EXPRESS TARGET DRIVER
  Cc: imx, cassel, 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 intended. Prepare to make struct dma_device private
to the DMA engine.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Change in v2
- correct tag nvmet
- change to prepare to make ...
- remove Assisted-by: LLM
---
 drivers/nvme/target/pci-epf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/target/pci-epf.c b/drivers/nvme/target/pci-epf.c
index 4199fead04ff3..ffb42244cc233 100644
--- a/drivers/nvme/target/pci-epf.c
+++ b/drivers/nvme/target/pci-epf.c
@@ -281,7 +281,7 @@ static bool nvmet_pci_epf_dma_filter(struct dma_chan *chan, void *arg)
 	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] 2+ messages in thread

* Re: [PATCH v2 1/1] nvmet: replace chan->device->dev with dmaengine_get_provider_device()
  2026-11-30 16:54 [PATCH v2 1/1] nvmet: replace chan->device->dev with dmaengine_get_provider_device() Frank.Li
@ 2026-11-30 16:58 ` Niklas Cassel
  0 siblings, 0 replies; 2+ messages in thread
From: Niklas Cassel @ 2026-11-30 16:58 UTC (permalink / raw)
  To: Frank.Li
  Cc: Christoph Hellwig, Sagi Grimberg, Chaitanya Kulkarni,
	open list:NVM EXPRESS TARGET DRIVER, imx, Frank Li

On Mon, Nov 30, 2026 at 11:54:01AM -0500, Frank.Li@oss.nxp.com wrote:
> 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 intended. Prepare to make struct dma_device private
> to the DMA engine.
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
> Change in v2
> - correct tag nvmet
> - change to prepare to make ...
> - remove Assisted-by: LLM
> ---
>  drivers/nvme/target/pci-epf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/target/pci-epf.c b/drivers/nvme/target/pci-epf.c
> index 4199fead04ff3..ffb42244cc233 100644
> --- a/drivers/nvme/target/pci-epf.c
> +++ b/drivers/nvme/target/pci-epf.c
> @@ -281,7 +281,7 @@ static bool nvmet_pci_epf_dma_filter(struct dma_chan *chan, void *arg)
>  	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
> 

Reviewed-by: Niklas Cassel <cassel@kernel.org>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-30 16:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 16:54 [PATCH v2 1/1] nvmet: replace chan->device->dev with dmaengine_get_provider_device() Frank.Li
2026-11-30 16:58 ` Niklas Cassel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox