Skip to contentSkip to conversation

PCI: epf-test: Use dmaengine_has_cap() instead of dma_has_cap()

PATCH Applied [email protected] 3 participants 3 messages Nov 6 – Nov 24

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

PATCH 1/1 PCI: epf-test: Use dmaengine_has_cap() instead of dma_has_cap()

From: Frank Li <[email protected]>

dmaengine_has_cap() takes a dma_chan pointer and avoids direct access to the cap_mask field inside struct dma_device, which is a step toward making struct dma_device internals private.

---
 drivers/pci/endpoint/functions/pci-epf-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/endpoint/functions/pci-epf-test.c +1 -1
index 14fa1fc10ead7..188c533293216 100644
@@ -371,7 +371,7 @@ static void pci_epf_test_copy(struct pci_epf_test *epf_test,
 	orig_size = copy_size = le32_to_cpu(reg->size);
 
 	if (flags & FLAG_USE_DMA) {
-		if (!dma_has_cap(DMA_MEMCPY, epf_test->dma_chan_tx->device->cap_mask)) {
+		if (!dmaengine_has_cap(epf_test->dma_chan_tx, DMA_MEMCPY)) {
 			dev_err(dev, "DMA controller doesn't support MEMCPY\n");
 			ret = -EINVAL;
 			goto set_status;
Signature · 1 line
2.43.0
#1 lore raw
Sashiko has reviewed this patch and found no issues.
Quoted 7 lines

From: Frank Li <[email protected]>

dmaengine_has_cap() takes a dma_chan pointer and avoids direct access to the cap_mask field inside struct dma_device, which is a step toward making struct dma_device internals private.

Sashiko has reviewed this patch and found no issues.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
maintainer Applied
#2 lore raw
In reply to [email protected]
Quoted 3 lines · On Fri, 06 Nov 2026 17:21:39 -0500, [email protected] wrote:

dmaengine_has_cap() takes a dma_chan pointer and avoids direct access to the cap_mask field inside struct dma_device, which is a step toward making struct dma_device internals private.

Applied, thanks!

[1/1] PCI: epf-test: Use dmaengine_has_cap() instead of dma_has_cap()

      commit: dd3bc74bea3263774e30fd6305012eb16dc0ec96

Best regards,

Signature · 1 line
மணிவண்ணன் சதாசிவம்