diff mbox series

wifi: ath12k: remove redundant memset() in ath12k_hal_reo_qdesc_setup()

Message ID 20231002182856.131254-1-dmantipov@yandex.ru
State New
Headers show
Series wifi: ath12k: remove redundant memset() in ath12k_hal_reo_qdesc_setup() | expand

Commit Message

Dmitry Antipov Oct. 2, 2023, 6:28 p.m. UTC
Since 'ath12k_dp_rx_peer_tid_setup()' is the only place where
'struct hal_rx_reo_queue' object is allocated with 'kzalloc()',
call to 'memset()' in 'ath12k_hal_reo_qdesc_setup()' may be
dropped. Compile tested only.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
 drivers/net/wireless/ath/ath12k/hal_rx.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Kalle Valo Oct. 10, 2023, 7:22 a.m. UTC | #1
Dmitry Antipov <dmantipov@yandex.ru> wrote:

> Since 'ath12k_dp_rx_peer_tid_setup()' is the only place where
> 'struct hal_rx_reo_queue' object is allocated with 'kzalloc()',
> call to 'memset()' in 'ath12k_hal_reo_qdesc_setup()' may be
> dropped. Compile tested only.
> 
> Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

258242dac924 wifi: ath12k: remove redundant memset() in ath12k_hal_reo_qdesc_setup()
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath12k/hal_rx.c b/drivers/net/wireless/ath/ath12k/hal_rx.c
index ee61a6462fdc..f6afbd8196bf 100644
--- a/drivers/net/wireless/ath/ath12k/hal_rx.c
+++ b/drivers/net/wireless/ath/ath12k/hal_rx.c
@@ -713,8 +713,6 @@  void ath12k_hal_reo_qdesc_setup(struct hal_rx_reo_queue *qdesc,
 {
 	struct hal_rx_reo_queue_ext *ext_desc;
 
-	memset(qdesc, 0, sizeof(*qdesc));
-
 	ath12k_hal_reo_set_desc_hdr(&qdesc->desc_hdr, HAL_DESC_REO_OWNED,
 				    HAL_DESC_REO_QUEUE_DESC,
 				    REO_QUEUE_DESC_MAGIC_DEBUG_PATTERN_0);