From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Parav Pandit <parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: "dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org"
<dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Steve Wise <swise-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>,
Dennis Dalessandro
<dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Lijun Ou <oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
Faisal Latif
<faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Shiraz Saleem
<shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Selvin Xavier
<selvin.xavier-1wcpHE2jlwO1Z/+hSey0Gg@public.gmane.org>,
Christian Benvenuti
<benve-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>,
Dave Goodell <dgoodell-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>,
Adit Ranadive <aditr-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>,
Michal Kalderon
<Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>,
Rajesh Borundia
<rajesh.borundia-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>,
Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH rdma-next 5/5] IB: Query port through the core instead of directly calling the driver handler
Date: Thu, 19 Jan 2017 11:36:48 +0200 [thread overview]
Message-ID: <20170119093648.GR32481@mtr-leonro.local> (raw)
In-Reply-To: <HE1PR0502MB3004E6D28AED46720C428576D17E0-692Kmc8YnlL9PhveBwpv4cDSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1949 bytes --]
On Thu, Jan 19, 2017 at 06:06:04AM +0000, Parav Pandit wrote:
> Minor nit for safer code.
>
> > -----Original Message-----
>
> > diff --git a/drivers/infiniband/hw/mlx4/alias_GUID.c
> > b/drivers/infiniband/hw/mlx4/alias_GUID.c
> > index 06020c5..4648374 100644
> > --- a/drivers/infiniband/hw/mlx4/alias_GUID.c
> > +++ b/drivers/infiniband/hw/mlx4/alias_GUID.c
> > @@ -499,6 +499,7 @@ static int set_guid_rec(struct ib_device *ibdev,
> > struct list_head *head =
> > &dev->sriov.alias_guid.ports_guid[port - 1].cb_list;
> >
> > + memset(&attr, 0, sizeof(struct ib_port_attr));
>
> Can you please change above code to,
> memset(&attr, 0, sizeof(attr));
Sure,
We will wait a little bit more to gather additional comments
if any and resubmit the series.
Thanks for the feedback.
>
> > diff --git a/drivers/infiniband/hw/mlx4/sysfs.c
> > b/drivers/infiniband/hw/mlx4/sysfs.c
> > index 69fb5ba..5835165 100644
> > --- a/drivers/infiniband/hw/mlx4/sysfs.c
> > +++ b/drivers/infiniband/hw/mlx4/sysfs.c
> > @@ -226,6 +226,7 @@ static int add_port_entries(struct mlx4_ib_dev
> > *device, int port_num)
> > int ret = 0 ;
> > struct ib_port_attr attr;
> >
> > + memset(&attr, 0, sizeof(struct ib_port_attr));
> Ditto.
> memset(&attr, 0, sizeof(attr));
>
>
> > a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
> > index 4e8e78f..176417b 100644
> > --- a/drivers/infiniband/hw/mlx5/main.c
> > +++ b/drivers/infiniband/hw/mlx5/main.c
> > @@ -174,7 +174,7 @@ static int mlx5_query_port_roce(struct ib_device
> >
> > for (port = 1; port <= MLX5_CAP_GEN(dev->mdev, num_ports);
> > port++) {
> > + memset(pprops, 0, sizeof(struct ib_port_attr));
> Here too.
> memset(pprops, 0, sizeof(*pprops));
>
> --
> 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-01-19 9:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-19 5:40 [PATCH rdma-next 0/5] USNIC and RAW enhancements series Leon Romanovsky
[not found] ` <20170119054102.20135-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-01-19 5:40 ` [PATCH rdma-next 1/5] IB/core: Add raw packet protocol Leon Romanovsky
2017-01-19 5:40 ` [PATCH rdma-next 2/5] IB/mlx5: Support " Leon Romanovsky
2017-01-19 5:41 ` [PATCH rdma-next 3/5] IB/mlx4: " Leon Romanovsky
2017-01-19 5:41 ` [PATCH rdma-next 4/5] IB: Add protocol for USNIC Leon Romanovsky
2017-01-19 5:41 ` [PATCH rdma-next 5/5] IB: Query port through the core instead of directly calling the driver handler Leon Romanovsky
[not found] ` <20170119054102.20135-6-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-01-19 6:06 ` Parav Pandit
[not found] ` <HE1PR0502MB3004E6D28AED46720C428576D17E0-692Kmc8YnlL9PhveBwpv4cDSnupUy6xnnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-01-19 9:36 ` Leon Romanovsky [this message]
2017-01-19 9:51 ` Or Gerlitz
2017-01-24 20:59 ` Shiraz Saleem
[not found] ` <20170124205938.GA5524-GOXS9JX10wfOxmVO0tvppfooFf0ArEBIu+b9c/7xato@public.gmane.org>
2017-01-25 12:39 ` Leon Romanovsky
[not found] ` <20170125123920.GO6005-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-01-25 14:29 ` Or Gerlitz
[not found] ` <CAJ3xEMjfxPs85OQP2v2MvYzU9ajUELs7_3r0nA-=TTa-tp-hSQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-25 18:05 ` Shiraz Saleem
[not found] ` <20170125180551.GA8964-GOXS9JX10wfOxmVO0tvppfooFf0ArEBIu+b9c/7xato@public.gmane.org>
2017-01-25 18:27 ` Leon Romanovsky
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=20170119093648.GR32481@mtr-leonro.local \
--to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=Michal.Kalderon-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org \
--cc=aditr-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org \
--cc=benve-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
--cc=dennis.dalessandro-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=dgoodell-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
--cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=faisal.latif-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=oulijun-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=parav-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=rajesh.borundia-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org \
--cc=selvin.xavier-1wcpHE2jlwO1Z/+hSey0Gg@public.gmane.org \
--cc=shiraz.saleem-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=swise-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org \
/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