* [PATCH] infiniband: mthca: Replace pci_pool_alloc by pci_pool_zalloc
@ 2016-11-28 12:51 Souptick Joarder
2016-12-01 6:06 ` Souptick Joarder
0 siblings, 1 reply; 3+ messages in thread
From: Souptick Joarder @ 2016-11-28 12:51 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA,
sahu.rameshwar73-Re5JQEeQqe8AvxtiuMwx3w
In mthca_create_ah(), pci_pool_alloc() followed by memset will be
replaced by pci_pool_zalloc()
Signed-off-by: Souptick joarder <jrdr.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
drivers/infiniband/hw/mthca/mthca_av.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/mthca/mthca_av.c b/drivers/infiniband/hw/mthca/mthca_av.c
index bcac294..c202c89 100644
--- a/drivers/infiniband/hw/mthca/mthca_av.c
+++ b/drivers/infiniband/hw/mthca/mthca_av.c
@@ -186,7 +186,7 @@ int mthca_create_ah(struct mthca_dev *dev,
on_hca_fail:
if (ah->type == MTHCA_AH_PCI_POOL) {
- ah->av = pci_pool_alloc(dev->av_table.pool,
+ ah->av = pci_pool_zalloc(dev->av_table.pool,
GFP_ATOMIC, &ah->avdma);
if (!ah->av)
return -ENOMEM;
@@ -196,7 +196,6 @@ int mthca_create_ah(struct mthca_dev *dev,
ah->key = pd->ntmr.ibmr.lkey;
- memset(av, 0, MTHCA_AV_SIZE);
av->port_pd = cpu_to_be32(pd->pd_num | (ah_attr->port_num << 24));
av->g_slid = ah_attr->src_path_bits;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] infiniband: mthca: Replace pci_pool_alloc by pci_pool_zalloc
2016-11-28 12:51 [PATCH] infiniband: mthca: Replace pci_pool_alloc by pci_pool_zalloc Souptick Joarder
@ 2016-12-01 6:06 ` Souptick Joarder
[not found] ` <CAFqt6zYAM8CUsBmTxU9KGw3Xum9oWzJTs3azizuvvhGkPJ1kTQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Souptick Joarder @ 2016-12-01 6:06 UTC (permalink / raw)
To: dledford-H+wXaHxf7aLQT0dZR+AlfA,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w, Hal Rosenstock
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Rameshwar Sahu
On Mon, Nov 28, 2016 at 6:21 PM, Souptick Joarder <jrdr.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> In mthca_create_ah(), pci_pool_alloc() followed by memset will be
> replaced by pci_pool_zalloc()
>
> Signed-off-by: Souptick joarder <jrdr.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> drivers/infiniband/hw/mthca/mthca_av.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/infiniband/hw/mthca/mthca_av.c b/drivers/infiniband/hw/mthca/mthca_av.c
> index bcac294..c202c89 100644
> --- a/drivers/infiniband/hw/mthca/mthca_av.c
> +++ b/drivers/infiniband/hw/mthca/mthca_av.c
> @@ -186,7 +186,7 @@ int mthca_create_ah(struct mthca_dev *dev,
>
> on_hca_fail:
> if (ah->type == MTHCA_AH_PCI_POOL) {
> - ah->av = pci_pool_alloc(dev->av_table.pool,
> + ah->av = pci_pool_zalloc(dev->av_table.pool,
> GFP_ATOMIC, &ah->avdma);
> if (!ah->av)
> return -ENOMEM;
> @@ -196,7 +196,6 @@ int mthca_create_ah(struct mthca_dev *dev,
>
> ah->key = pd->ntmr.ibmr.lkey;
>
> - memset(av, 0, MTHCA_AV_SIZE);
>
> av->port_pd = cpu_to_be32(pd->pd_num | (ah_attr->port_num << 24));
> av->g_slid = ah_attr->src_path_bits;
> --
> 1.9.1
>
Any comment on this patch?
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] infiniband: mthca: Replace pci_pool_alloc by pci_pool_zalloc
[not found] ` <CAFqt6zYAM8CUsBmTxU9KGw3Xum9oWzJTs3azizuvvhGkPJ1kTQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-12-01 8:12 ` Yuval Shaia
0 siblings, 0 replies; 3+ messages in thread
From: Yuval Shaia @ 2016-12-01 8:12 UTC (permalink / raw)
To: Souptick Joarder
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA,
sean.hefty-ral2JQCrhuEAvxtiuMwx3w, Hal Rosenstock,
linux-rdma-u79uwXL29TY76Z2rM5mHXA, Rameshwar Sahu
On Thu, Dec 01, 2016 at 11:36:24AM +0530, Souptick Joarder wrote:
> On Mon, Nov 28, 2016 at 6:21 PM, Souptick Joarder <jrdr.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > In mthca_create_ah(), pci_pool_alloc() followed by memset will be
> > replaced by pci_pool_zalloc()
> >
> > Signed-off-by: Souptick joarder <jrdr.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > ---
> > drivers/infiniband/hw/mthca/mthca_av.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/infiniband/hw/mthca/mthca_av.c b/drivers/infiniband/hw/mthca/mthca_av.c
> > index bcac294..c202c89 100644
> > --- a/drivers/infiniband/hw/mthca/mthca_av.c
> > +++ b/drivers/infiniband/hw/mthca/mthca_av.c
> > @@ -186,7 +186,7 @@ int mthca_create_ah(struct mthca_dev *dev,
> >
> > on_hca_fail:
> > if (ah->type == MTHCA_AH_PCI_POOL) {
> > - ah->av = pci_pool_alloc(dev->av_table.pool,
> > + ah->av = pci_pool_zalloc(dev->av_table.pool,
> > GFP_ATOMIC, &ah->avdma);
> > if (!ah->av)
> > return -ENOMEM;
> > @@ -196,7 +196,6 @@ int mthca_create_ah(struct mthca_dev *dev,
> >
> > ah->key = pd->ntmr.ibmr.lkey;
> >
> > - memset(av, 0, MTHCA_AV_SIZE);
> >
> > av->port_pd = cpu_to_be32(pd->pd_num | (ah_attr->port_num << 24));
> > av->g_slid = ah_attr->src_path_bits;
> > --
> > 1.9.1
> >
>
> Any comment on this patch?
I believe the same comments as for "mellanox :mlx4: Replace pci_pool_alloc
by pci_pool_zalloc", i.e. indentation of GFP_ATOMIC (AFAIK it can join the
line above) and removal of unneeded empty line.
Besides these two cosmetics comments the patch seems to be fine.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-12-01 8:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-28 12:51 [PATCH] infiniband: mthca: Replace pci_pool_alloc by pci_pool_zalloc Souptick Joarder
2016-12-01 6:06 ` Souptick Joarder
[not found] ` <CAFqt6zYAM8CUsBmTxU9KGw3Xum9oWzJTs3azizuvvhGkPJ1kTQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-01 8:12 ` Yuval Shaia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox