wifi: ath12k: remove memset with byte count of 278528
PATCH 1/1 wifi: ath12k: remove memset with byte count of 278528
From: Kalle Valo <[email protected]>
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.
--- drivers/net/wireless/ath/ath12k/dp.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/wireless/ath/ath12k/dp.c +1 -4
@@ -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 ;
base-commit: 5aa9ff08c0b71be15a607341fa5344546e19ceb2
Signature · 7 lines
2.30.2 -- ath12k mailing list [email protected] https://lists.infradead.org/mailman/listinfo/ath12k
Quoted 9 lines · Kalle Valo
Sparse warns:
drivers/net/wireless/ath/ath12k/dp.c:1471:15: warning: memset with byte count of 278528There's no need to use
memset()here, instead calldma_alloc_coherent()with__GFP_ZERO.While at it, remove an extra line before the error handler.
Signed-off-by Kalle Valo <[email protected]>
Patch applied to ath-next branch of ath.git, thanks.
28013c356296 wifi: ath12k: remove memset with byte count of 278528
Signature · 9 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches -- ath12k mailing list [email protected] https://lists.infradead.org/mailman/listinfo/ath12k