All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCHv2 1/1] IB/ipoib: Remove unnecessary returned value check
       [not found] ` <1483522018-4669-1-git-send-email-yanjun.zhu-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
@ 2017-01-05  2:33   ` Yanjun Zhu
       [not found]     ` <586DB06C.5020600-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Yanjun Zhu @ 2017-01-05  2:33 UTC (permalink / raw)
  To: guanglei.li-QHcLZuEGTsvQT0dZR+AlfA,
	dledford-H+wXaHxf7aLQT0dZR+AlfA,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, leon-DgEjT+Ai2ygdnm+yROfE0A,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA

Hi, Yuval Shaia && Leon Romanovsky && Maintainers

Follow your advice, a new patch is made. Please check it.

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;
>   

--
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] 8+ messages in thread

* Re: [PATCHv2 1/1] IB/ipoib: Remove unnecessary returned value check
       [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
  1 sibling, 1 reply; 8+ messages in thread
From: Yuval Shaia @ 2017-01-05  6:05 UTC (permalink / raw)
  To: Yanjun Zhu
  Cc: guanglei.li-QHcLZuEGTsvQT0dZR+AlfA,
	dledford-H+wXaHxf7aLQT0dZR+AlfA,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, leon-DgEjT+Ai2ygdnm+yROfE0A

Hi Zhu Yanjun,
Patch looks fine.

However, the way it is posted makes it hard (maybe impossible) to apply.
Suggesting to repost using git send-email.

Yuval

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.
> 
> 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;
> 
> --
> 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] 8+ messages in thread

* Re: [PATCHv2 1/1] IB/ipoib: Remove unnecessary returned value check
       [not found]     ` <586DB06C.5020600-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
  2017-01-05  6:05       ` Yuval Shaia
@ 2017-01-05  6:12       ` Leon Romanovsky
       [not found]         ` <20170105061236.GV12077-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
  1 sibling, 1 reply; 8+ messages in thread
From: Leon Romanovsky @ 2017-01-05  6:12 UTC (permalink / raw)
  To: Yanjun Zhu
  Cc: guanglei.li-QHcLZuEGTsvQT0dZR+AlfA,
	dledford-H+wXaHxf7aLQT0dZR+AlfA,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA

[-- 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 --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCHv2 1/1] IB/ipoib: Remove unnecessary returned value check
       [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>
  0 siblings, 1 reply; 8+ messages in thread
From: Zhu Yanjun @ 2017-01-05  8:56 UTC (permalink / raw)
  To: leon-DgEjT+Ai2ygdnm+yROfE0A
  Cc: guanglei.li-QHcLZuEGTsvQT0dZR+AlfA,
	dledford-H+wXaHxf7aLQT0dZR+AlfA,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA, Zhu Yanjun

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;
 
-- 
2.7.4

--
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] 8+ messages in thread

* Re: [PATCHv2 1/1] IB/ipoib: Remove unnecessary returned value check
  2017-01-05  6:05       ` Yuval Shaia
@ 2017-01-05  8:58         ` Yanjun Zhu
  0 siblings, 0 replies; 8+ messages in thread
From: Yanjun Zhu @ 2017-01-05  8:58 UTC (permalink / raw)
  To: Yuval Shaia
  Cc: guanglei.li-QHcLZuEGTsvQT0dZR+AlfA,
	dledford-H+wXaHxf7aLQT0dZR+AlfA,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, leon-DgEjT+Ai2ygdnm+yROfE0A

Sorry. My bad. I resend it now.

Zhu Yanjun

On 2017/1/5 14:05, Yuval Shaia wrote:
> Hi Zhu Yanjun,
> Patch looks fine.
>
> However, the way it is posted makes it hard (maybe impossible) to apply.
> Suggesting to repost using git send-email.
>
> Yuval
>
> 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.
>>
>> 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;
>> --
>> 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
>

--
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] 8+ messages in thread

* Re: [PATCHv2 1/1] IB/ipoib: Remove unnecessary returned value check
       [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
  1 sibling, 0 replies; 8+ messages in thread
From: Yuval Shaia @ 2017-01-05  9:08 UTC (permalink / raw)
  To: Zhu Yanjun
  Cc: leon-DgEjT+Ai2ygdnm+yROfE0A, guanglei.li-QHcLZuEGTsvQT0dZR+AlfA,
	dledford-H+wXaHxf7aLQT0dZR+AlfA,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA

On Thu, Jan 05, 2017 at 03:56:08AM -0500, 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;

Reviewed-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

>  
> -- 
> 2.7.4
> 
> --
> 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] 8+ messages in thread

* Re: [PATCHv2 1/1] IB/ipoib: Remove unnecessary returned value check
       [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>
  1 sibling, 1 reply; 8+ messages in thread
From: Leon Romanovsky @ 2017-01-05 12:50 UTC (permalink / raw)
  To: Zhu Yanjun
  Cc: guanglei.li-QHcLZuEGTsvQT0dZR+AlfA,
	dledford-H+wXaHxf7aLQT0dZR+AlfA,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA

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

On Thu, Jan 05, 2017 at 03:56:08AM -0500, 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>
> ---

Thanks,
Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCHv2 1/1] IB/ipoib: Remove unnecessary returned value check
       [not found]                 ` <20170105125022.GA15685-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
@ 2017-01-24 21:35                   ` Doug Ledford
  0 siblings, 0 replies; 8+ messages in thread
From: Doug Ledford @ 2017-01-24 21:35 UTC (permalink / raw)
  To: Leon Romanovsky, Zhu Yanjun
  Cc: guanglei.li-QHcLZuEGTsvQT0dZR+AlfA,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w,
	dmitry.torokhov-Re5JQEeQqe8AvxtiuMwx3w,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA

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

On Thu, 2017-01-05 at 14:50 +0200, Leon Romanovsky wrote:
> On Thu, Jan 05, 2017 at 03:56:08AM -0500, 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>
> > ---
> 
> Thanks,
> Reviewed-by: Leon Romanovsky <leonro-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Thanks, applied to -next area.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG KeyID: B826A3330E572FDD
   
Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-01-24 21:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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
     [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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.