* [PATCH -next] qed: Remove useless set memory to zero use memset()
@ 2016-10-18 15:54 Wei Yongjun
2016-10-18 17:20 ` Sergei Shtylyov
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-10-18 15:54 UTC (permalink / raw)
To: Yuval Mintz, Ariel Elior; +Cc: Wei Yongjun, everest-linux-l2, netdev
From: Wei Yongjun <weiyongjun1@huawei.com>
The memory return by kzalloc() has already be set to zero, so
remove useless memset(0).
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/net/ethernet/qlogic/qed/qed_roce.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_roce.c b/drivers/net/ethernet/qlogic/qed/qed_roce.c
index f3a825a..6a353ff 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_roce.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_roce.c
@@ -2658,7 +2658,6 @@ static int qed_roce_ll2_start(struct qed_dev *cdev,
DP_ERR(cdev, "qed roce ll2 start: failed memory allocation\n");
return -ENOMEM;
}
- memset(roce_ll2, 0, sizeof(*roce_ll2));
roce_ll2->handle = QED_LL2_UNUSED_HANDLE;
roce_ll2->cbs = params->cbs;
roce_ll2->cb_cookie = params->cb_cookie;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] qed: Remove useless set memory to zero use memset()
2016-10-18 15:54 [PATCH -next] qed: Remove useless set memory to zero use memset() Wei Yongjun
@ 2016-10-18 17:20 ` Sergei Shtylyov
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2016-10-18 17:20 UTC (permalink / raw)
To: Wei Yongjun, Yuval Mintz, Ariel Elior
Cc: Wei Yongjun, everest-linux-l2, netdev
On 10/18/2016 06:54 PM, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> The memory return by kzalloc() has already be set to zero, so
Returned?
> remove useless memset(0).
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
[...]
MBR, Sergei
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-18 17:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-18 15:54 [PATCH -next] qed: Remove useless set memory to zero use memset() Wei Yongjun
2016-10-18 17:20 ` Sergei Shtylyov
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).