summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalle Valo <quic_kvalo@quicinc.com>2023-02-22 19:40:14 +0300
committerKalle Valo <quic_kvalo@quicinc.com>2023-02-24 13:23:16 +0300
commit28013c35629647679e10cb1bbf36c3feec2af756 (patch)
treee7914101a673f4ccbc143c527138b5c26a3c01c0
parent4a51e66fe96dfde76894c4eb445ef1b14d312014 (diff)
downloadlinux-28013c35629647679e10cb1bbf36c3feec2af756.tar.xz
wifi: ath12k: remove memset with byte count of 278528
Sparse warns: drivers/net/wireless/ath/ath12k/dp.c:1471:15: warning: memset with byte count of 278528 There's no need to use memset() here, instead call dma_alloc_coherent() with __GFP_ZERO. While at it, remove an extra line before the error handler. Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Link: https://lore.kernel.org/r/20230222164014.860-1-kvalo@kernel.org
-rw-r--r--drivers/net/wireless/ath/ath12k/dp.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath12k/dp.c b/drivers/net/wireless/ath/ath12k/dp.c
index 9926d81c5fe4..ae1645d0f42a 100644
--- a/drivers/net/wireless/ath/ath12k/dp.c
+++ b/drivers/net/wireless/ath/ath12k/dp.c
@@ -1461,15 +1461,12 @@ static int ath12k_dp_reoq_lut_setup(struct ath12k_base *ab)
dp->reoq_lut.vaddr = dma_alloc_coherent(ab->dev,
DP_REOQ_LUT_SIZE,
&dp->reoq_lut.paddr,
- GFP_KERNEL);
-
+ GFP_KERNEL | __GFP_ZERO);
if (!dp->reoq_lut.vaddr) {
ath12k_warn(ab, "failed to allocate memory for reoq table");
return -ENOMEM;
}
- memset(dp->reoq_lut.vaddr, 0, DP_REOQ_LUT_SIZE);
-
ath12k_hif_write32(ab, HAL_SEQ_WCSS_UMAC_REO_REG + HAL_REO1_QDESC_LUT_BASE0(ab),
dp->reoq_lut.paddr);
return 0;