From: Jason Gunthorpe <jgg@ziepe.ca>
To: Fuqian Huang <huangfq.daxian@gmail.com>
Cc: Potnuri Bharat Teja <bharat@chelsio.com>,
Doug Ledford <dledford@redhat.com>, Lijun Ou <oulijun@huawei.com>,
"Wei Hu(Xavier)" <xavier.huwei@huawei.com>,
Faisal Latif <faisal.latif@intel.com>,
Selvin Xavier <selvin.xavier@broadcom.com>,
Devesh Sharma <devesh.sharma@broadcom.com>,
Leon Romanovsky <leon@kernel.org>,
Luis Chamberlain <mcgrof@kernel.org>,
Bart Van Assche <bvanassche@acm.org>,
Parav Pandit <parav@mellanox.com>,
Kamal Heib <kamalheib1@gmail.com>,
Feras Daoud <ferasda@mellanox.com>,
Erez Shitrit <erezsh@mellanox.com>,
Aaron Knister <aaron.s.knister@nasa.gov>,
Denis Drozdov <denisd@mellanox.com>,
linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 09/27] infiniband: remove unneeded memset
Date: Wed, 3 Jul 2019 14:32:07 -0300 [thread overview]
Message-ID: <20190703173207.GA10729@ziepe.ca> (raw)
In-Reply-To: <20190628024723.15257-1-huangfq.daxian@gmail.com>
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@gmail.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
prev parent reply other threads:[~2019-07-03 17:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-28 2:47 [PATCH v2 09/27] infiniband: remove unneeded memset Fuqian Huang
2019-07-03 17:32 ` Jason Gunthorpe [this message]
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=20190703173207.GA10729@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=aaron.s.knister@nasa.gov \
--cc=bharat@chelsio.com \
--cc=bvanassche@acm.org \
--cc=denisd@mellanox.com \
--cc=devesh.sharma@broadcom.com \
--cc=dledford@redhat.com \
--cc=erezsh@mellanox.com \
--cc=faisal.latif@intel.com \
--cc=ferasda@mellanox.com \
--cc=huangfq.daxian@gmail.com \
--cc=kamalheib1@gmail.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=oulijun@huawei.com \
--cc=parav@mellanox.com \
--cc=selvin.xavier@broadcom.com \
--cc=xavier.huwei@huawei.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