nvmet: replace chan->device->dev with dmaengine_get_provider_device()
Subsystems (3)
PATCH v2 1/1 nvmet: replace chan->device->dev with dmaengine_get_provider_device()
From: Frank Li <[email protected]>
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.
---
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(-)
drivers/nvme/target/pci-epf.c +1 -1
@@ -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); }
Signature · 1 line
2.43.0
Quoted 34 lines · On Mon, Nov 30, 2026 at 11:54:01AM -0500, [email protected] wrote:
From: Frank Li <[email protected]>
Use the
dmaengine_get_provider_device()API instead of directly accessingchan->device->devto get the DMA provider device.No functional change intended. Prepare to make struct
dma_deviceprivate to the DMA engine.Signed-off-by Frank Li <[email protected]>---
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(-)drivers/nvme/target/pci-epf.c +1
-1@@ -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); }Signature · 1 line
2.43.0
Quoted 8 lines · On Mon, 30 Nov 2026 11:54:01 -0500, [email protected] wrote:
Use the
dmaengine_get_provider_device()API instead of directly accessingchan->device->devto get the DMA provider device.No functional change intended. Prepare to make struct
dma_deviceprivate to the DMA engine.[...]
Thanks, applied to nvme-7.5.
[1/1] nvmet: replace chan->device->dev with dmaengine_get_provider_device()
commit: 0e6b3974404416c245142586c3e94de0306f59fd
--
Keith Busch <[email protected]>