Commit fb670347 authored by Sabyasachi Gupta's avatar Sabyasachi Gupta Committed by Jason Gunthorpe

infiniband/hw/cxgb3/cxio_hal.c: Use dma_zalloc_coherent

Replaced dma_alloc_coherent + memset with dma_zalloc_coherent
Signed-off-by: default avatarSabyasachi Gupta <sabyasachi.linux@gmail.com>
Acked-by: default avatarSteve Wise <swise@opengridcomputing.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 87429024
...@@ -291,13 +291,12 @@ int cxio_create_qp(struct cxio_rdev *rdev_p, u32 kernel_domain, ...@@ -291,13 +291,12 @@ int cxio_create_qp(struct cxio_rdev *rdev_p, u32 kernel_domain,
if (!wq->sq) if (!wq->sq)
goto err3; 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), depth * sizeof(union t3_wr),
&(wq->dma_addr), GFP_KERNEL); &(wq->dma_addr), GFP_KERNEL);
if (!wq->queue) if (!wq->queue)
goto err4; goto err4;
memset(wq->queue, 0, depth * sizeof(union t3_wr));
dma_unmap_addr_set(wq, mapping, wq->dma_addr); dma_unmap_addr_set(wq, mapping, wq->dma_addr);
wq->doorbell = (void __iomem *)rdev_p->rnic_info.kdb_addr; wq->doorbell = (void __iomem *)rdev_p->rnic_info.kdb_addr;
if (!kernel_domain) if (!kernel_domain)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment