From: Zheng Yongjun Date: Mon, 18 Jan 2021 16:26:00 +0000 (+0200) Subject: wcn36xx: Remove unnecessary memset X-Git-Tag: v5.12-rc1~200^2~62^2~39^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=337cd0d3ce0c2e005b650d8ab8f2b05a91ca132e;p=thirdparty%2Fkernel%2Flinux.git wcn36xx: Remove unnecessary memset 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 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201223012516.24286-1-zhengyongjun3@huawei.com --- diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 5445277dd8de6..28d3ee3ad4b9c 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -485,7 +485,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)