Re: [PATCH v2] crypto: octeontx2 - Use dma_alloc_noncoherent() instead of kzalloc/dma_map_single()
From: Herbert Xu
Date: Fri Oct 22 2021 - 08:11:28 EST
Cai Huoqing <caihuoqing@xxxxxxxxx> wrote:
>
> @@ -1489,11 +1482,9 @@ int otx2_cpt_discover_eng_capabilities(struct otx2_cptpf_dev *cptpf)
>
> cptpf->eng_caps[etype].u = be64_to_cpup(rptr);
> }
> - dma_unmap_single(&pdev->dev, rptr_baddr, len, DMA_BIDIRECTIONAL);
> + dma_free_noncoherent(&pdev->dev, len, (void *)result, rptr_baddr, DMA_BIDIRECTIONAL);
Why the cast?
Cheers,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt