diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2019-01-04 03:23:09 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2019-01-08 07:58:37 -0500 |
commit | 750afb08ca71310fcf0c4e2cb1565c63b8235b60 (patch) | |
tree | 1dde3877eb4a1a0f0349786b66c3d9276ae94561 /drivers/net/wireless/ath/ath10k/ce.c | |
parent | 3bd6e94bec122a951d462c239b47954cf5f36e33 (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/net/wireless/ath/ath10k/ce.c')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/ce.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c index f6d3ecbdd3a3..2a5668b4f6bc 100644 --- a/drivers/net/wireless/ath/ath10k/ce.c +++ b/drivers/net/wireless/ath/ath10k/ce.c | |||
@@ -1553,10 +1553,9 @@ ath10k_ce_alloc_dest_ring(struct ath10k *ar, unsigned int ce_id, | |||
1553 | * coherent DMA are unsupported | 1553 | * coherent DMA are unsupported |
1554 | */ | 1554 | */ |
1555 | dest_ring->base_addr_owner_space_unaligned = | 1555 | dest_ring->base_addr_owner_space_unaligned = |
1556 | dma_zalloc_coherent(ar->dev, | 1556 | dma_alloc_coherent(ar->dev, |
1557 | (nentries * sizeof(struct ce_desc) + | 1557 | (nentries * sizeof(struct ce_desc) + CE_DESC_RING_ALIGN), |
1558 | CE_DESC_RING_ALIGN), | 1558 | &base_addr, GFP_KERNEL); |
1559 | &base_addr, GFP_KERNEL); | ||
1560 | if (!dest_ring->base_addr_owner_space_unaligned) { | 1559 | if (!dest_ring->base_addr_owner_space_unaligned) { |
1561 | kfree(dest_ring); | 1560 | kfree(dest_ring); |
1562 | return ERR_PTR(-ENOMEM); | 1561 | return ERR_PTR(-ENOMEM); |