summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/wmi.c
diff options
context:
space:
mode:
authorYueHaibing2018-06-04 14:35:42 +0200
committerKalle Valo2018-06-14 17:12:32 +0200
commit9fb31b66b91ff4e6c38fa0a10e517f4282e380e7 (patch)
treec8e2c5161cec3bd24e5bafdb7df59bf65da13fab /drivers/net/wireless/ath/ath10k/wmi.c
parentath10k: fix incorrect size of dma_free_coherent in ath10k_ce_alloc_src_ring_64 (diff)
downloadkernel-qcow2-linux-9fb31b66b91ff4e6c38fa0a10e517f4282e380e7.tar.gz
kernel-qcow2-linux-9fb31b66b91ff4e6c38fa0a10e517f4282e380e7.tar.xz
kernel-qcow2-linux-9fb31b66b91ff4e6c38fa0a10e517f4282e380e7.zip
ath10k: use dma_zalloc_coherent instead of allocator/memset
Use dma_zalloc_coherent instead of dma_alloc_coherent followed by memset 0. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/wmi.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index be841cbf8099..877249ac6fd4 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -5018,13 +5018,11 @@ static int ath10k_wmi_alloc_chunk(struct ath10k *ar, u32 req_id,
void *vaddr;
pool_size = num_units * round_up(unit_len, 4);
- vaddr = dma_alloc_coherent(ar->dev, pool_size, &paddr, GFP_KERNEL);
+ vaddr = dma_zalloc_coherent(ar->dev, pool_size, &paddr, GFP_KERNEL);
if (!vaddr)
return -ENOMEM;
- memset(vaddr, 0, pool_size);
-
ar->wmi.mem_chunks[idx].vaddr = vaddr;
ar->wmi.mem_chunks[idx].paddr = paddr;
ar->wmi.mem_chunks[idx].len = pool_size;