public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Yanjun Zhu <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: guanglei.li-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org,
	dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCHv2 1/1] IB/ipoib: Remove unnecessary returned value check
Date: Thu, 5 Jan 2017 08:12:36 +0200	[thread overview]
Message-ID: <20170105061236.GV12077@mtr-leonro.local> (raw)
In-Reply-To: <586DB06C.5020600-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 3754 bytes --]

On Thu, Jan 05, 2017 at 10:33:16AM +0800, Yanjun Zhu wrote:
> Hi, Yuval Shaia && Leon Romanovsky && Maintainers
>
> Follow your advice, a new patch is made. Please check it.

How are you sending it? I missed this patch and first version too.
Are you sending it with git send-email?

Was your patch catched in patchworks [1]? and linux-rdma mailing list?

Please post it properly, so we will be able to review it and Doug will
be able to apply it.

[1] https://patchwork.kernel.org/project/linux-rdma/list/

Thanks

>
> Thanks a lot.
> Zhu Yanjun
>
> On 2017/1/4 17:26, Zhu Yanjun wrote:
> > In the function ipoib_set_dev_features, the returned value is always 0.
> > As such, it is not necessary to check the returned value.
> > This is not a bug. It is a trivial problem.
> >
> > Reviewed-by: Guanglei Li <guanglei.li-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> > Signed-off-by: Zhu Yanjun <yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> > ---
> > Change from v1 to v2:
> >   make change to __ipoib_vlan_add.
> >   change the commit header.
> >
> >   drivers/infiniband/ulp/ipoib/ipoib.h      | 2 +-
> >   drivers/infiniband/ulp/ipoib/ipoib_main.c | 8 ++------
> >   drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 4 +---
> >   3 files changed, 4 insertions(+), 10 deletions(-)
> >
> > diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h
> > index da12717..f568064 100644
> > --- a/drivers/infiniband/ulp/ipoib/ipoib.h
> > +++ b/drivers/infiniband/ulp/ipoib/ipoib.h
> > @@ -593,7 +593,7 @@ void ipoib_pkey_open(struct ipoib_dev_priv *priv);
> >   void ipoib_drain_cq(struct net_device *dev);
> >   void ipoib_set_ethtool_ops(struct net_device *dev);
> > -int ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca);
> > +void ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca);
> >   #define IPOIB_FLAGS_RC		0x80
> >   #define IPOIB_FLAGS_UC		0x40
> > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> > index 3ce0765..4e8e11e 100644
> > --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> > +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> > @@ -1984,7 +1984,7 @@ int ipoib_add_pkey_attr(struct net_device *dev)
> >   	return device_create_file(&dev->dev, &dev_attr_pkey);
> >   }
> > -int ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca)
> > +void ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca)
> >   {
> >   	priv->hca_caps = hca->attrs.device_cap_flags;
> > @@ -1996,8 +1996,6 @@ int ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca)
> >   		priv->dev->features |= priv->dev->hw_features;
> >   	}
> > -
> > -	return 0;
> >   }
> >   static struct net_device *ipoib_add_port(const char *format,
> > @@ -2037,9 +2035,7 @@ static struct net_device *ipoib_add_port(const char *format,
> >   		goto device_init_failed;
> >   	}
> > -	result = ipoib_set_dev_features(priv, hca);
> > -	if (result)
> > -		goto device_init_failed;
> > +	ipoib_set_dev_features(priv, hca);
> >   	/*
> >   	 * Set the full membership bit, so that we join the right
> > diff --git a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
> > index a2f9f29..0c2988d 100644
> > --- a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
> > +++ b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c
> > @@ -61,9 +61,7 @@ int __ipoib_vlan_add(struct ipoib_dev_priv *ppriv, struct ipoib_dev_priv *priv,
> >   	priv->parent = ppriv->dev;
> >   	set_bit(IPOIB_FLAG_SUBINTERFACE, &priv->flags);
> > -	result = ipoib_set_dev_features(priv, ppriv->ca);
> > -	if (result)
> > -		goto err;
> > +	ipoib_set_dev_features(priv, ppriv->ca);
> >   	priv->pkey = pkey;
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2017-01-05  6:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1483522018-4669-1-git-send-email-yanjun.zhu@oracle.com>
     [not found] ` <1483522018-4669-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-01-05  2:33   ` [PATCHv2 1/1] IB/ipoib: Remove unnecessary returned value check Yanjun Zhu
     [not found]     ` <586DB06C.5020600-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-01-05  6:05       ` Yuval Shaia
2017-01-05  8:58         ` Yanjun Zhu
2017-01-05  6:12       ` Leon Romanovsky [this message]
     [not found]         ` <20170105061236.GV12077-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-01-05  8:56           ` Zhu Yanjun
     [not found]             ` <1483606568-17232-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2017-01-05  9:08               ` Yuval Shaia
2017-01-05 12:50               ` Leon Romanovsky
     [not found]                 ` <20170105125022.GA15685-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-01-24 21:35                   ` Doug Ledford

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=20170105061236.GV12077@mtr-leonro.local \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=guanglei.li-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@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