diff mbox series

[wireless,v2,-next] wcn36xx: Remove unnecessary memset

Message ID 20201223012516.24286-1-zhengyongjun3@huawei.com (mailing list archive)
State Accepted
Commit 337cd0d3ce0c2e005b650d8ab8f2b05a91ca132e
Delegated to: Kalle Valo
Headers show
Series [wireless,v2,-next] wcn36xx: Remove unnecessary memset | expand

Commit Message

Zheng Yongjun Dec. 23, 2020, 1:25 a.m. UTC
memcpy operation is next to memset code, and the size to copy is equals to the size to
memset, so the memset operation is unnecessary, remove it.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 drivers/net/wireless/ath/wcn36xx/smd.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Kalle Valo Jan. 26, 2021, 4:25 p.m. UTC | #1
Zheng Yongjun <zhengyongjun3@huawei.com> wrote:

> memcpy operation is next to memset code, and the size to copy is equals to the size to
> memset, so the memset operation is unnecessary, remove it.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

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

337cd0d3ce0c wcn36xx: Remove unnecessary memset
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 766400f7b61c..273fed22711f 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -484,7 +484,6 @@  static void init_hal_msg(struct wcn36xx_hal_msg_header *hdr,
 
 #define PREPARE_HAL_PTT_MSG_BUF(send_buf, p_msg_body) \
 	do {							\
-		memset(send_buf, 0, p_msg_body->header.len); \
 		memcpy(send_buf, p_msg_body, p_msg_body->header.len); \
 	} while (0)