Re: [PATCH v3 3/9] PCI: endpoint: pci-epf-test: Use dmaenigne_prep_config_single() to simplify code

Manivannan Sadhasivam <[email protected]>
Newsgroups dev.linux.lists.mhi,dev.linux.lists.imx,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-nvme,org.kernel.vger.dmaengine,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-crypto,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci
Message-ID <tfqwmj24eu2rf6h4ecvkgom44tgjkaihtgmln7v3zcyy5burcb@sg3q5qafbzgf>
On Mon, Jan 05, 2026 at 05:46:53PM -0500, Frank Li wrote:
> Use dmaenigne_prep_config_single() to simplify code.
> 
> No functional change.
> 
> Tested-by: Niklas Cassel <[email protected]>
> Reviewed-by: Damien Le Moal <[email protected]>
> Signed-off-by: Frank Li <[email protected]>

Acked-by: Manivannan Sadhasivam <[email protected]>

- Mani

> ---
> change in v3
> - add Damien Le Moal review tag
> ---
>  drivers/pci/endpoint/functions/pci-epf-test.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
> index debd235253c5ba54eb8f06d13261c407ee3768ec..95b046c678da7ca4a0d9616acdd544251dc05aac 100644
> --- a/drivers/pci/endpoint/functions/pci-epf-test.c
> +++ b/drivers/pci/endpoint/functions/pci-epf-test.c
> @@ -162,12 +162,8 @@ static int pci_epf_test_data_transfer(struct pci_epf_test *epf_test,
>  		else
>  			sconf.src_addr = dma_remote;
>  
> -		if (dmaengine_slave_config(chan, &sconf)) {
> -			dev_err(dev, "DMA slave config fail\n");
> -			return -EIO;
> -		}
> -		tx = dmaengine_prep_slave_single(chan, dma_local, len, dir,
> -						 flags);
> +		tx = dmaengine_prep_config_single(chan, dma_local, len,
> +						  dir, flags, &sconf);
>  	} else {
>  		tx = dmaengine_prep_dma_memcpy(chan, dma_dst, dma_src, len,
>  					       flags);
> 
> -- 
> 2.34.1
> 

-- 
மணிவண்ணன் சதாசிவம்
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.