linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] infiniband/hw/cxgb4/qp.c: Use dma_zalloc_coherent
@ 2018-11-12 15:21 Sabyasachi Gupta
  2018-11-12 15:31 ` Steve Wise
  2018-11-21 22:59 ` Jason Gunthorpe
  0 siblings, 2 replies; 3+ messages in thread
From: Sabyasachi Gupta @ 2018-11-12 15:21 UTC (permalink / raw)
  To: swise, dledford, jgg
  Cc: jrdr.linux, linux-rdma, linux-kernel, brajeswar.linux

Replaced dma_alloc_coherent + memset with dma_zalloc_coherent

Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com>
---
 drivers/infiniband/hw/cxgb4/qp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
index 13478f3..5a8030b 100644
--- a/drivers/infiniband/hw/cxgb4/qp.c
+++ b/drivers/infiniband/hw/cxgb4/qp.c
@@ -2564,13 +2564,12 @@ static int alloc_srq_queue(struct c4iw_srq *srq, struct c4iw_dev_ucontext *uctx,
 	wq->rqt_abs_idx = (wq->rqt_hwaddr - rdev->lldi.vr->rq.start) >>
 		T4_RQT_ENTRY_SHIFT;
 
-	wq->queue = dma_alloc_coherent(&rdev->lldi.pdev->dev,
+	wq->queue = dma_zalloc_coherent(&rdev->lldi.pdev->dev,
 				       wq->memsize, &wq->dma_addr,
 			GFP_KERNEL);
 	if (!wq->queue)
 		goto err_free_rqtpool;
 
-	memset(wq->queue, 0, wq->memsize);
 	dma_unmap_addr_set(wq, mapping, wq->dma_addr);
 
 	wq->bar2_va = c4iw_bar2_addrs(rdev, wq->qid, CXGB4_BAR2_QTYPE_EGRESS,
-- 
2.7.4


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

* Re: [PATCH] infiniband/hw/cxgb4/qp.c: Use dma_zalloc_coherent
  2018-11-12 15:21 [PATCH] infiniband/hw/cxgb4/qp.c: Use dma_zalloc_coherent Sabyasachi Gupta
@ 2018-11-12 15:31 ` Steve Wise
  2018-11-21 22:59 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Steve Wise @ 2018-11-12 15:31 UTC (permalink / raw)
  To: Sabyasachi Gupta, dledford, jgg
  Cc: jrdr.linux, linux-rdma, linux-kernel, brajeswar.linux



On 11/12/2018 9:21 AM, Sabyasachi Gupta wrote:
> Replaced dma_alloc_coherent + memset with dma_zalloc_coherent
> 
> Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com>
> ---
>  drivers/infiniband/hw/cxgb4/qp.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c
> index 13478f3..5a8030b 100644
> --- a/drivers/infiniband/hw/cxgb4/qp.c
> +++ b/drivers/infiniband/hw/cxgb4/qp.c
> @@ -2564,13 +2564,12 @@ static int alloc_srq_queue(struct c4iw_srq *srq, struct c4iw_dev_ucontext *uctx,
>  	wq->rqt_abs_idx = (wq->rqt_hwaddr - rdev->lldi.vr->rq.start) >>
>  		T4_RQT_ENTRY_SHIFT;
>  
> -	wq->queue = dma_alloc_coherent(&rdev->lldi.pdev->dev,
> +	wq->queue = dma_zalloc_coherent(&rdev->lldi.pdev->dev,
>  				       wq->memsize, &wq->dma_addr,
>  			GFP_KERNEL);
>  	if (!wq->queue)
>  		goto err_free_rqtpool;
>  
> -	memset(wq->queue, 0, wq->memsize);
>  	dma_unmap_addr_set(wq, mapping, wq->dma_addr);
>  
>  	wq->bar2_va = c4iw_bar2_addrs(rdev, wq->qid, CXGB4_BAR2_QTYPE_EGRESS,
> 

Acked-by: Steve Wise <swise@opengridcomputing.com>

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

* Re: [PATCH] infiniband/hw/cxgb4/qp.c: Use dma_zalloc_coherent
  2018-11-12 15:21 [PATCH] infiniband/hw/cxgb4/qp.c: Use dma_zalloc_coherent Sabyasachi Gupta
  2018-11-12 15:31 ` Steve Wise
@ 2018-11-21 22:59 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2018-11-21 22:59 UTC (permalink / raw)
  To: Sabyasachi Gupta
  Cc: swise, dledford, jrdr.linux, linux-rdma, linux-kernel, brajeswar.linux

On Mon, Nov 12, 2018 at 08:51:59PM +0530, Sabyasachi Gupta wrote:
> Replaced dma_alloc_coherent + memset with dma_zalloc_coherent
> 
> Signed-off-by: Sabyasachi Gupta <sabyasachi.linux@gmail.com>
> Acked-by: Steve Wise <swise@opengridcomputing.com>
> ---
>  drivers/infiniband/hw/cxgb4/qp.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Applied to for-next

Thanks,
Jason

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

end of thread, other threads:[~2018-11-21 22:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-12 15:21 [PATCH] infiniband/hw/cxgb4/qp.c: Use dma_zalloc_coherent Sabyasachi Gupta
2018-11-12 15:31 ` Steve Wise
2018-11-21 22:59 ` Jason Gunthorpe

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