infiniband/hw/cxgb4/qp.c: Use dma_zalloc_coherent
Subsystems (2)
PATCH 1/1 infiniband/hw/cxgb4/qp.c: Use dma_zalloc_coherent
Replaced dma_alloc_coherent + memset with dma_zalloc_coherent
Signed-off-by Sabyasachi Gupta <[email protected]>
--- drivers/infiniband/hw/cxgb4/qp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/infiniband/hw/cxgb4/qp.c +1 -2
@@ -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,
Signature · 1 line
2.7.4
Quoted 17 lines · Sabyasachi Gupta
Replaced
dma_alloc_coherent+ memset withdma_zalloc_coherentSigned-off-by Sabyasachi Gupta <[email protected]>--- drivers/infiniband/hw/cxgb4/qp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/infiniband/hw/cxgb4/qp.c +0
-1@@ -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,
drivers/infiniband/hw/cxgb4/qp.c static int alloc_srq_queue(struct c4iw_srq *srq, struct c4iw_dev_ucontext *uctx, · line 2575
Quoted 10 lines
drivers/infiniband/hw/cxgb4/qp.c +1
-1+ 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 <[email protected]>
Jason Gunthorpe
AppliedQuoted 7 lines · Sabyasachi Gupta
Replaced
dma_alloc_coherent+ memset withdma_zalloc_coherentSigned-off-by Sabyasachi Gupta <[email protected]>Acked-by Steve Wise <[email protected]>--- drivers/infiniband/hw/cxgb4/qp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Applied to for-next
Thanks,
Jason