Linux-RDMA Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH net-next] net/mlx5: DR, Remove useless set memory to zero use memset()
@ 2019-09-05  9:53 Wei Yongjun
  2019-09-05 19:37 ` Saeed Mahameed
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2019-09-05  9:53 UTC (permalink / raw)
  To: Saeed Mahameed, Leon Romanovsky, Mark Bloch, Alex Vesker, Erez Shitrit
  Cc: Wei Yongjun, netdev, linux-rdma, kernel-janitors

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(-)

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,




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net/mlx5: DR, Remove useless set memory to zero use memset()
  2019-09-05  9:53 [PATCH net-next] net/mlx5: DR, Remove useless set memory to zero use memset() Wei Yongjun
@ 2019-09-05 19:37 ` Saeed Mahameed
  0 siblings, 0 replies; 2+ messages in thread
From: Saeed Mahameed @ 2019-09-05 19:37 UTC (permalink / raw)
  To: Erez Shitrit, weiyongjun1, Mark Bloch, leon, Alex Vesker
  Cc: kernel-janitors, netdev, linux-rdma

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 !

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05  9:53 [PATCH net-next] net/mlx5: DR, Remove useless set memory to zero use memset() Wei Yongjun
2019-09-05 19:37 ` Saeed Mahameed

Linux-RDMA Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rdma/0 linux-rdma/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rdma linux-rdma/ https://lore.kernel.org/linux-rdma \
		linux-rdma@vger.kernel.org linux-rdma@archiver.kernel.org
	public-inbox-index linux-rdma


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rdma


AGPL code for this site: git clone https://public-inbox.org/ public-inbox