aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/mediatek/mtk-platform.c
diff options
context:
space:
mode:
authorLuis Chamberlain <mcgrof@kernel.org>2019-01-04 03:23:09 -0500
committerChristoph Hellwig <hch@lst.de>2019-01-08 07:58:37 -0500
commit750afb08ca71310fcf0c4e2cb1565c63b8235b60 (patch)
tree1dde3877eb4a1a0f0349786b66c3d9276ae94561 /drivers/crypto/mediatek/mtk-platform.c
parent3bd6e94bec122a951d462c239b47954cf5f36e33 (diff)
cross-tree: phase out dma_zalloc_coherent()
We already need to zero out memory for dma_alloc_coherent(), as such using dma_zalloc_coherent() is superflous. Phase it out. This change was generated with the following Coccinelle SmPL patch: @ replace_dma_zalloc_coherent @ expression dev, size, data, handle, flags; @@ -dma_zalloc_coherent(dev, size, handle, flags) +dma_alloc_coherent(dev, size, handle, flags) Suggested-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> [hch: re-ran the script on the latest tree] Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/crypto/mediatek/mtk-platform.c')
-rw-r--r--drivers/crypto/mediatek/mtk-platform.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/crypto/mediatek/mtk-platform.c b/drivers/crypto/mediatek/mtk-platform.c
index ee0404e27a0f..5660e5e5e022 100644
--- a/drivers/crypto/mediatek/mtk-platform.c
+++ b/drivers/crypto/mediatek/mtk-platform.c
@@ -453,17 +453,17 @@ static int mtk_desc_ring_alloc(struct mtk_cryp *cryp)
453 if (!ring[i]) 453 if (!ring[i])
454 goto err_cleanup; 454 goto err_cleanup;
455 455
456 ring[i]->cmd_base = dma_zalloc_coherent(cryp->dev, 456 ring[i]->cmd_base = dma_alloc_coherent(cryp->dev,
457 MTK_DESC_RING_SZ, 457 MTK_DESC_RING_SZ,
458 &ring[i]->cmd_dma, 458 &ring[i]->cmd_dma,
459 GFP_KERNEL); 459 GFP_KERNEL);
460 if (!ring[i]->cmd_base) 460 if (!ring[i]->cmd_base)
461 goto err_cleanup; 461 goto err_cleanup;
462 462
463 ring[i]->res_base = dma_zalloc_coherent(cryp->dev, 463 ring[i]->res_base = dma_alloc_coherent(cryp->dev,
464 MTK_DESC_RING_SZ, 464 MTK_DESC_RING_SZ,
465 &ring[i]->res_dma, 465 &ring[i]->res_dma,
466 GFP_KERNEL); 466 GFP_KERNEL);
467 if (!ring[i]->res_base) 467 if (!ring[i]->res_base)
468 goto err_cleanup; 468 goto err_cleanup;
469 469