[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190703173207.GA10729@ziepe.ca>
Date: Wed, 3 Jul 2019 14:32:07 -0300
From: Jason Gunthorpe <jgg@...pe.ca>
To: Fuqian Huang <huangfq.daxian@...il.com>
Cc: Potnuri Bharat Teja <bharat@...lsio.com>,
Doug Ledford <dledford@...hat.com>,
Lijun Ou <oulijun@...wei.com>,
"Wei Hu(Xavier)" <xavier.huwei@...wei.com>,
Faisal Latif <faisal.latif@...el.com>,
Selvin Xavier <selvin.xavier@...adcom.com>,
Devesh Sharma <devesh.sharma@...adcom.com>,
Leon Romanovsky <leon@...nel.org>,
Luis Chamberlain <mcgrof@...nel.org>,
Bart Van Assche <bvanassche@....org>,
Parav Pandit <parav@...lanox.com>,
Kamal Heib <kamalheib1@...il.com>,
Feras Daoud <ferasda@...lanox.com>,
Erez Shitrit <erezsh@...lanox.com>,
Aaron Knister <aaron.s.knister@...a.gov>,
Denis Drozdov <denisd@...lanox.com>,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 09/27] infiniband: remove unneeded memset
On Fri, Jun 28, 2019 at 10:47:19AM +0800, Fuqian Huang wrote:
> pci_alloc_consistent calls dma_alloc_coherent directly.
> In commit af7ddd8a627c
> ("Merge tag 'dma-mapping-4.21' of git://git.infradead.org/users/hch/dma-mapping"),
> dma_alloc_coherent/dmam_alloc_coherent has already zeroed the memory.
> So the memset after these 3 function calls is not needed.
>
> Signed-off-by: Fuqian Huang <huangfq.daxian@...il.com>
> ---
> drivers/infiniband/hw/cxgb3/cxio_hal.c | 3 ---
> drivers/infiniband/hw/cxgb4/cq.c | 1 -
> drivers/infiniband/hw/cxgb4/qp.c | 1 -
> drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 1 -
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 ---
> drivers/infiniband/hw/mthca/mthca_allocator.c | 2 --
> drivers/infiniband/hw/nes/nes_verbs.c | 3 ---
> drivers/infiniband/hw/ocrdma/ocrdma_hw.c | 3 ---
> drivers/infiniband/ulp/ipoib/ipoib_cm.c | 1 -
> 9 files changed, 18 deletions(-)
Thanks, applied to rdma for-next
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> index aa9dcfc36cd3..c59e00a0881f 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
> @@ -1153,7 +1153,6 @@ static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn,
> ret = -ENOMEM;
> goto err_tx;
> }
> - memset(p->tx_ring, 0, ipoib_sendq_size * sizeof(*p->tx_ring));
>
> p->qp = ipoib_cm_create_tx_qp(p->dev, p);
> memalloc_noio_restore(noio_flag);
I dropped this hunk and used the seperate patch since this has nothing
to do with dma_alloc_coherent.
Jason
Powered by blists - more mailing lists