diff mbox series

[wireless,v2] scsi: megaraid: Remove unnecessary memset

Message ID 20210115014559.7803-1-zhengyongjun3@huawei.com
State New
Headers show
Series [wireless,v2] scsi: megaraid: Remove unnecessary memset | expand

Commit Message

Zheng Yongjun Jan. 15, 2021, 1:45 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. 25, 2021, 2:38 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>

Wrong title.

Patch set to Changes Requested.
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 273fed22711f..5447a6696c35 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -478,7 +478,6 @@  static void init_hal_msg(struct wcn36xx_hal_msg_header *hdr,
 
 #define PREPARE_HAL_BUF(send_buf, msg_body) \
 	do {							\
-		memset(send_buf, 0, msg_body.header.len);	\
 		memcpy(send_buf, &msg_body, sizeof(msg_body));	\
 	} while (0)						\