diff mbox series

[net-next] net/mlx5: DR, Remove useless set memory to zero use memset()

Message ID 20190905095326.127277-1-weiyongjun1@huawei.com (mailing list archive)
State Not Applicable
Headers show
Series [net-next] net/mlx5: DR, Remove useless set memory to zero use memset() | expand

Commit Message

Wei Yongjun Sept. 5, 2019, 9:53 a.m. UTC
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/mellanox/mlx5/core/steering/dr_send.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Saeed Mahameed Sept. 5, 2019, 7:37 p.m. UTC | #1
On Thu, 2019-09-05 at 09:53 +0000, Wei Yongjun wrote:
> The memory return by kzalloc() has already be set to zero, so
> remove useless memset(0).
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Applied to net-next-mlx5.
Thanks !
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c
index ef0dea44f3b3..5df8436b2ae3 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c
@@ -899,7 +899,6 @@  int mlx5dr_send_ring_alloc(struct mlx5dr_domain *dmn)
 		goto clean_qp;
 	}
 
-	memset(dmn->send_ring->buf, 0, size);
 	dmn->send_ring->buf_size = size;
 
 	dmn->send_ring->mr = dr_reg_mr(dmn->mdev,