Skip to contentSkip to conversation

PCI: epf-mhi: use dmaengine_desc_set_callback()

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

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

PATCH 1/1 PCI: epf-mhi: use dmaengine_desc_set_callback()

From: Frank Li <[email protected]>

Replace open-coded assignments to callback and callback_param fields of struct dma_async_tx_descriptor with calls to the dmaengine_desc_set_callback() helper.

No functional change intended. Prepare to make struct dma_async_tx_descriptor private to the DMA engine.

---
 drivers/pci/endpoint/functions/pci-epf-mhi.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/pci/endpoint/functions/pci-epf-mhi.c +8 -8
index 78f1fb1a6b0c7..a63c50d235d6e 100644
@@ -346,8 +346,8 @@ static int pci_epf_mhi_edma_read(struct mhi_ep_cntrl *mhi_cntrl,
 		goto err_unmap;
 	}
 
-	desc->callback = pci_epf_mhi_dma_callback;
-	desc->callback_param = &complete;
+	dmaengine_desc_set_callback(desc, pci_epf_mhi_dma_callback, NULL,
+				    &complete);
 
 	cookie = dmaengine_submit(desc);
 	ret = dma_submit_error(cookie);
@@ -414,8 +414,8 @@ static int pci_epf_mhi_edma_write(struct mhi_ep_cntrl *mhi_cntrl,
 		goto err_unmap;
 	}
 
-	desc->callback = pci_epf_mhi_dma_callback;
-	desc->callback_param = &complete;
+	dmaengine_desc_set_callback(desc, pci_epf_mhi_dma_callback, NULL,
+				    &complete);
 
 	cookie = dmaengine_submit(desc);
 	ret = dma_submit_error(cookie);
@@ -526,8 +526,8 @@ static int pci_epf_mhi_edma_read_async(struct mhi_ep_cntrl *mhi_cntrl,
 	transfer->dir = DMA_FROM_DEVICE;
 	memcpy(&transfer->buf_info, buf_info, sizeof(*buf_info));
 
-	desc->callback = pci_epf_mhi_dma_async_callback;
-	desc->callback_param = transfer;
+	dmaengine_desc_set_callback(desc, pci_epf_mhi_dma_async_callback, NULL,
+				    transfer);
 
 	cookie = dmaengine_submit(desc);
 	ret = dma_submit_error(cookie);
@@ -600,8 +600,8 @@ static int pci_epf_mhi_edma_write_async(struct mhi_ep_cntrl *mhi_cntrl,
 	transfer->dir = DMA_TO_DEVICE;
 	memcpy(&transfer->buf_info, buf_info, sizeof(*buf_info));
 
-	desc->callback = pci_epf_mhi_dma_async_callback;
-	desc->callback_param = transfer;
+	dmaengine_desc_set_callback(desc, pci_epf_mhi_dma_async_callback, NULL,
+				    transfer);
 
 	cookie = dmaengine_submit(desc);
 	ret = dma_submit_error(cookie);
Signature · 1 line
2.43.0
#1 lore raw
Sashiko has reviewed this patch and found no issues.
Quoted 10 lines

From: Frank Li <[email protected]>

Replace open-coded assignments to callback and callback_param fields of struct dma_async_tx_descriptor with calls to the dmaengine_desc_set_callback() helper.

No functional change intended. Prepare to make struct dma_async_tx_descriptor private to the DMA engine.

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 8 lines · On Mon, 02 Nov 2026 14:55:33 -0500, [email protected] wrote:

Replace open-coded assignments to callback and callback_param fields of struct dma_async_tx_descriptor with calls to the dmaengine_desc_set_callback() helper.

No functional change intended. Prepare to make struct dma_async_tx_descriptor private to the DMA engine.

[...]

Applied, thanks!

[1/1] PCI: epf-mhi: use dmaengine_desc_set_callback()

      commit: 65e3ce63b21f75b12a65a0a00107b28155b3b0a7

Best regards,

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