All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 28/87] infiniband: ulp: remove memset after vzalloc in ipoib_cm.c
@ 2019-06-27 17:38 ` Fuqian Huang
  0 siblings, 0 replies; 3+ messages in thread
From: Fuqian Huang @ 2019-06-27 17:38 UTC (permalink / raw)
  Cc: Fuqian Huang, Doug Ledford, Jason Gunthorpe, Leon Romanovsky,
	Kamal Heib, Feras Daoud, Erez Shitrit, Bart Van Assche,
	Aaron Knister, Denis Drozdov, Parav Pandit, linux-rdma,
	linux-kernel

vzalloc has already zeroed the memory.
So memset is unneeded.

Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
---
 drivers/infiniband/ulp/ipoib/ipoib_cm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
index aa9dcfc36cd3..c59e00a0881f 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -1153,7 +1153,6 @@ static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn,
 		ret = -ENOMEM;
 		goto err_tx;
 	}
-	memset(p->tx_ring, 0, ipoib_sendq_size * sizeof(*p->tx_ring));
 
 	p->qp = ipoib_cm_create_tx_qp(p->dev, p);
 	memalloc_noio_restore(noio_flag);
-- 
2.11.0

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

* [PATCH 28/87] infiniband: ulp: remove memset after vzalloc in ipoib_cm.c
@ 2019-06-27 17:38 ` Fuqian Huang
  0 siblings, 0 replies; 3+ messages in thread
From: Fuqian Huang @ 2019-06-27 17:38 UTC (permalink / raw)
  Cc: Fuqian Huang, Doug Ledford, Jason Gunthorpe, Leon Romanovsky,
	Kamal Heib, Feras Daoud, Erez Shitrit, Bart Van Assche,
	Aaron Knister, Denis Drozdov, Parav Pandit, linux-rdma,
	linux-kernel

vzalloc has already zeroed the memory.
So memset is unneeded.

Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
---
 drivers/infiniband/ulp/ipoib/ipoib_cm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
index aa9dcfc36cd3..c59e00a0881f 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -1153,7 +1153,6 @@ static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn,
 		ret = -ENOMEM;
 		goto err_tx;
 	}
-	memset(p->tx_ring, 0, ipoib_sendq_size * sizeof(*p->tx_ring));
 
 	p->qp = ipoib_cm_create_tx_qp(p->dev, p);
 	memalloc_noio_restore(noio_flag);
-- 
2.11.0


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

* Re: [PATCH 28/87] infiniband: ulp: remove memset after vzalloc in ipoib_cm.c
  2019-06-27 17:38 ` Fuqian Huang
  (?)
@ 2019-07-03 17:29 ` Jason Gunthorpe
  -1 siblings, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2019-07-03 17:29 UTC (permalink / raw)
  To: Fuqian Huang
  Cc: Doug Ledford, Leon Romanovsky, Kamal Heib, Feras Daoud,
	Erez Shitrit, Bart Van Assche, Aaron Knister, Denis Drozdov,
	Parav Pandit, linux-rdma, linux-kernel

On Fri, Jun 28, 2019 at 01:38:04AM +0800, Fuqian Huang wrote:
> vzalloc has already zeroed the memory.
> So memset is unneeded.
> 
> Signed-off-by: Fuqian Huang <huangfq.daxian@gmail.com>
>  drivers/infiniband/ulp/ipoib/ipoib_cm.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> index aa9dcfc36cd3..c59e00a0881f 100644
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> @@ -1153,7 +1153,6 @@ static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn,
>  		ret = -ENOMEM;
>  		goto err_tx;
>  	}
> -	memset(p->tx_ring, 0, ipoib_sendq_size * sizeof(*p->tx_ring));
>  
>  	p->qp = ipoib_cm_create_tx_qp(p->dev, p);
>  	memalloc_noio_restore(noio_flag);

Applied to for-next

Thanks,
Jason

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

end of thread, other threads:[~2019-07-03 17:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-27 17:38 [PATCH 28/87] infiniband: ulp: remove memset after vzalloc in ipoib_cm.c Fuqian Huang
2019-06-27 17:38 ` Fuqian Huang
2019-07-03 17:29 ` Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.