* [PATCH -next] scsi: megaraid: Remove unnecessary memset
@ 2020-12-22 13:34 Zheng Yongjun
2020-12-22 14:33 ` Kalle Valo
0 siblings, 1 reply; 4+ messages in thread
From: Zheng Yongjun @ 2020-12-22 13:34 UTC (permalink / raw)
To: davem, kuba, wcn36xx, linux-wireless, netdev, linux-kernel; +Cc: Zheng Yongjun
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(-)
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)
--
2.22.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -next] scsi: megaraid: Remove unnecessary memset
2020-12-22 13:34 [PATCH -next] scsi: megaraid: Remove unnecessary memset Zheng Yongjun
@ 2020-12-22 14:33 ` Kalle Valo
0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2020-12-22 14:33 UTC (permalink / raw)
To: Zheng Yongjun; +Cc: davem, kuba, wcn36xx, linux-wireless, netdev, linux-kernel
Zheng Yongjun <zhengyongjun3@huawei.com> writes:
> 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(-)
The title is wrong, this is not about scsi. Please resend as v2.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] scsi: megaraid: Remove unnecessary memset
2020-12-22 13:34 Zheng Yongjun
@ 2021-01-14 17:08 ` Kalle Valo
0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2021-01-14 17:08 UTC (permalink / raw)
To: Zheng Yongjun
Cc: davem, kuba, wcn36xx, linux-wireless, netdev, linux-kernel,
Zheng Yongjun
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>
The title is wrong, please fix that and resend.
Patch set to Changes Requested.
--
https://patchwork.kernel.org/project/linux-wireless/patch/20201222133442.20078-1-zhengyongjun3@huawei.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH -next] scsi: megaraid: Remove unnecessary memset
@ 2020-12-22 13:34 Zheng Yongjun
2021-01-14 17:08 ` Kalle Valo
0 siblings, 1 reply; 4+ messages in thread
From: Zheng Yongjun @ 2020-12-22 13:34 UTC (permalink / raw)
To: davem, kuba, wcn36xx, linux-wireless, netdev, linux-kernel; +Cc: Zheng Yongjun
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(-)
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)
--
2.22.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-01-14 17:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-22 13:34 [PATCH -next] scsi: megaraid: Remove unnecessary memset Zheng Yongjun
2020-12-22 14:33 ` Kalle Valo
2020-12-22 13:34 Zheng Yongjun
2021-01-14 17:08 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).