infiniband/hw/cxgb3/cxio_hal.c: Use dma_zalloc_coherent
PATCH 1/1 infiniband/hw/cxgb3/cxio_hal.c: Use dma_zalloc_coherent
Replaced dma_alloc_coherent + memset with dma_zalloc_coherent
Signed-off-by Sabyasachi Gupta <[email protected]>
--- drivers/infiniband/hw/cxgb3/cxio_hal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/infiniband/hw/cxgb3/cxio_hal.c +1 -2
@@ -291,13 +291,12 @@ int cxio_create_qp(struct cxio_rdev *rdev_p, u32 kernel_domain,if (!wq->sq) goto err3; - wq->queue =dma_alloc_coherent (&(rdev_p->rnic_info.pdev->dev), + wq->queue =dma_zalloc_coherent (&(rdev_p->rnic_info.pdev->dev), depth *sizeof (union t3_wr ), &(wq->dma_addr),GFP_KERNEL );if (!wq->queue) goto err4; -memset (wq->queue,0 , depth *sizeof (union t3_wr ));dma_unmap_addr_set (wq, mapping, wq->dma_addr); wq->doorbell = (void __iomem *)rdev_p->rnic_info.kdb_addr;if (!kernel_domain)
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/cxgb3/cxio_hal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/infiniband/hw/cxgb3/cxio_hal.c +0
-1@@ -291,13 +291,12 @@ int cxio_create_qp(struct cxio_rdev *rdev_p, u32 kernel_domain,if (!wq->sq) goto err3; - wq->queue = dma_alloc_coherent(&(rdev_p->rnic_info.pdev->dev),
drivers/infiniband/hw/cxgb3/cxio_hal.c int cxio_create_qp(struct cxio_rdev *rdev_p, u32 kernel_domain, · line 302
Quoted 10 lines
drivers/infiniband/hw/cxgb3/cxio_hal.c +1
-1+ wq->queue =dma_zalloc_coherent (&(rdev_p->rnic_info.pdev->dev), depth *sizeof (union t3_wr ), &(wq->dma_addr),GFP_KERNEL );if (!wq->queue) goto err4; -memset (wq->queue,0 , depth *sizeof (union t3_wr ));dma_unmap_addr_set (wq, mapping, wq->dma_addr); wq->doorbell = (void __iomem *)rdev_p->rnic_info.kdb_addr;if (!kernel_domain)
Acked-by Steve Wise <[email protected]>
Quoted 17 lines · Sabyasachi Gupta
Replaced
dma_alloc_coherent+ memset withdma_zalloc_coherentSigned-off-by Sabyasachi Gupta <[email protected]>--- drivers/infiniband/hw/cxgb3/cxio_hal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)drivers/infiniband/hw/cxgb3/cxio_hal.c +0
-1@@ -291,13 +291,12 @@ int cxio_create_qp(struct cxio_rdev *rdev_p, u32 kernel_domain,if (!wq->sq) goto err3; - wq->queue = dma_alloc_coherent(&(rdev_p->rnic_info.pdev->dev),
drivers/infiniband/hw/cxgb3/cxio_hal.c int cxio_create_qp(struct cxio_rdev *rdev_p, u32 kernel_domain, · line 302
Quoted 10 lines
drivers/infiniband/hw/cxgb3/cxio_hal.c +1
-1+ wq->queue =dma_zalloc_coherent (&(rdev_p->rnic_info.pdev->dev), depth *sizeof (union t3_wr ), &(wq->dma_addr),GFP_KERNEL );if (!wq->queue) goto err4; -memset (wq->queue,0 , depth *sizeof (union t3_wr ));dma_unmap_addr_set (wq, mapping, wq->dma_addr); wq->doorbell = (void __iomem *)rdev_p->rnic_info.kdb_addr;if (!kernel_domain)
Acked-by Steve Wise <[email protected]>
Jason Gunthorpe
AppliedQuoted 8 lines · Sabyasachi Gupta
Replaced
dma_alloc_coherent+ memset withdma_zalloc_coherentSigned-off-by Sabyasachi Gupta <[email protected]>Acked-by Steve Wise <[email protected]>Acked-by Steve Wise <[email protected]>--- drivers/infiniband/hw/cxgb3/cxio_hal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Applied to for-next
Thanks,
Jason