linux-rdma.vger.kernel.org archive mirror
 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/cxgb3/cxio_hal.c: Use dma_zalloc_coherent
Date: Mon, 12 Nov 2018 09:31:49 -0600	[thread overview]
Message-ID: <aeebe6af-87f2-1006-5c35-95eb49ecc727@opengridcomputing.com> (raw)
In-Reply-To: <5be5bad9.1c69fb81.db750.d226@mx.google.com>



On 11/9/2018 10:50 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/cxgb3/cxio_hal.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/cxgb3/cxio_hal.c b/drivers/infiniband/hw/cxgb3/cxio_hal.c
> index dcb4bba..df4f7a3 100644
> --- a/drivers/infiniband/hw/cxgb3/cxio_hal.c
> +++ b/drivers/infiniband/hw/cxgb3/cxio_hal.c
> @@ -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)
> 

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

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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-09 16:50 [PATCH] infiniband/hw/cxgb3/cxio_hal.c: Use dma_zalloc_coherent Sabyasachi Gupta
2018-11-12 15:28 ` Steve Wise
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=aeebe6af-87f2-1006-5c35-95eb49ecc727@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;
as well as URLs for NNTP newsgroup(s).