Skip to contentSkip to conversation

nvme: replace chan->device->dev with dmaengine_get_provider_device()

PATCH New [email protected] 1 participant 1 message Nov 3

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme: 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 make to struct dma_device private to the DMA engine.

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
index a8df176c1a574..4a2def0b7cc3a 100644
@@ -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