public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Steve Wise <swise@opengridcomputing.com>
To: Sabyasachi Gupta <sabyasachi.linux@gmail.com>,
	dledford@redhat.com, jgg@ziepe.ca
Cc: jrdr.linux@gmail.com, linux-rdma@vger.kernel.org,
	linux-kernel@vger.kernel.org, brajeswar.linux@gmail.com
Subject: Re: [PATCH] infiniband/hw/cxgb4/qp.c: Use dma_zalloc_coherent
Date: Mon, 12 Nov 2018 09:31:52 -0600	[thread overview]
Message-ID: <53589711-602e-1a0f-9036-ff0d0c30bf57@opengridcomputing.com> (raw)
In-Reply-To: <5be99a9e.1c69fb81.87c65.4ec2@mx.google.com>



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>

  reply	other threads:[~2018-11-12 15:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12 15:21 [PATCH] infiniband/hw/cxgb4/qp.c: Use dma_zalloc_coherent Sabyasachi Gupta
2018-11-12 15:31 ` Steve Wise [this message]
2018-11-21 22:59 ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53589711-602e-1a0f-9036-ff0d0c30bf57@opengridcomputing.com \
    --to=swise@opengridcomputing.com \
    --cc=brajeswar.linux@gmail.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=jrdr.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sabyasachi.linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox