linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] net/mlx5: simplify the return expression of mlx5_ec_init()
@ 2020-09-21 13:10 Qinglang Miao
  2020-09-22  5:52 ` Saeed Mahameed
  0 siblings, 1 reply; 4+ messages in thread
From: Qinglang Miao @ 2020-09-21 13:10 UTC (permalink / raw)
  To: Saeed Mahameed, Leon Romanovsky
  Cc: David S. Miller, Jakub Kicinski, netdev, linux-rdma,
	linux-kernel, Qinglang Miao

Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/ecpf.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ecpf.c b/drivers/net/ethernet/mellanox/mlx5/core/ecpf.c
index a894ea98c..fa05b4657 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/ecpf.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/ecpf.c
@@ -51,11 +51,7 @@ int mlx5_ec_init(struct mlx5_core_dev *dev)
 	/* ECPF shall enable HCA for peer PF in the same way a PF
 	 * does this for its VFs.
 	 */
-	err = mlx5_peer_pf_init(dev);
-	if (err)
-		return err;
-
-	return 0;
+	return mlx5_peer_pf_init(dev);
 }
 
 void mlx5_ec_cleanup(struct mlx5_core_dev *dev)
-- 
2.23.0


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

* Re: [PATCH -next] net/mlx5: simplify the return expression of mlx5_ec_init()
  2020-09-21 13:10 [PATCH -next] net/mlx5: simplify the return expression of mlx5_ec_init() Qinglang Miao
@ 2020-09-22  5:52 ` Saeed Mahameed
  2020-09-22 15:04   ` Jakub Kicinski
  0 siblings, 1 reply; 4+ messages in thread
From: Saeed Mahameed @ 2020-09-22  5:52 UTC (permalink / raw)
  To: Qinglang Miao, Leon Romanovsky
  Cc: David S. Miller, Jakub Kicinski, netdev, linux-rdma, linux-kernel

On Mon, 2020-09-21 at 21:10 +0800, Qinglang Miao wrote:
> Simplify the return expression.
> 
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/ecpf.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> 

Applied to net-next-mlx5.

Thanks.


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

* Re: [PATCH -next] net/mlx5: simplify the return expression of mlx5_ec_init()
  2020-09-22  5:52 ` Saeed Mahameed
@ 2020-09-22 15:04   ` Jakub Kicinski
  2020-09-22 19:53     ` Saeed Mahameed
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Kicinski @ 2020-09-22 15:04 UTC (permalink / raw)
  To: Saeed Mahameed
  Cc: Qinglang Miao, Leon Romanovsky, David S. Miller, netdev,
	linux-rdma, linux-kernel

On Mon, 21 Sep 2020 22:52:30 -0700 Saeed Mahameed wrote:
> On Mon, 2020-09-21 at 21:10 +0800, Qinglang Miao wrote:
> > Simplify the return expression.
> > 
> > Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> > ---
> >  drivers/net/ethernet/mellanox/mlx5/core/ecpf.c | 6 +-----
> >  1 file changed, 1 insertion(+), 5 deletions(-)
> > 
> >   
> 
> Applied to net-next-mlx5.

Beware:

drivers/net/ethernet/mellanox/mlx5/core/ecpf.c: In function ‘mlx5_ec_init’:
drivers/net/ethernet/mellanox/mlx5/core/ecpf.c:46:6: warning: unused variable ‘err’ [-Wunused-variable]
  46 |  int err = 0;
     |      ^~~

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

* Re: [PATCH -next] net/mlx5: simplify the return expression of mlx5_ec_init()
  2020-09-22 15:04   ` Jakub Kicinski
@ 2020-09-22 19:53     ` Saeed Mahameed
  0 siblings, 0 replies; 4+ messages in thread
From: Saeed Mahameed @ 2020-09-22 19:53 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: Qinglang Miao, Leon Romanovsky, David S. Miller, netdev,
	linux-rdma, linux-kernel

On Tue, 2020-09-22 at 08:04 -0700, Jakub Kicinski wrote:
> On Mon, 21 Sep 2020 22:52:30 -0700 Saeed Mahameed wrote:
> > On Mon, 2020-09-21 at 21:10 +0800, Qinglang Miao wrote:
> > > Simplify the return expression.
> > > 
> > > Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> > > ---
> > >  drivers/net/ethernet/mellanox/mlx5/core/ecpf.c | 6 +-----
> > >  1 file changed, 1 insertion(+), 5 deletions(-)
> > > 
> > >   
> > 
> > Applied to net-next-mlx5.
> 
> Beware:
> 
> drivers/net/ethernet/mellanox/mlx5/core/ecpf.c: In function
> ‘mlx5_ec_init’:
> drivers/net/ethernet/mellanox/mlx5/core/ecpf.c:46:6: warning: unused
> variable ‘err’ [-Wunused-variable]
>   46 |  int err = 0;
>      |      ^~~

Thanks Jakub

Yes, Saw this in my CI as well, 
will resolve this one myself.
and for next time I will wait for the CI result before replying ;)


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

end of thread, other threads:[~2020-09-22 19:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 13:10 [PATCH -next] net/mlx5: simplify the return expression of mlx5_ec_init() Qinglang Miao
2020-09-22  5:52 ` Saeed Mahameed
2020-09-22 15:04   ` Jakub Kicinski
2020-09-22 19:53     ` Saeed Mahameed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).