Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
* [PATCH] net/mlx5e: Fix an IS_ERR() vs NULL check
@ 2020-03-04 14:22 Dan Carpenter
  2020-03-04 20:31 ` Saeed Mahameed
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2020-03-04 14:22 UTC (permalink / raw)
  To: Saeed Mahameed, Eli Cohen
  Cc: Leon Romanovsky, Mark Bloch, Paul Blakey, linux-rdma,
	kernel-janitors

The esw_vport_tbl_get() function returns error pointers on error.

Fixes: 96e326878fa5 ("net/mlx5e: Eswitch, Use per vport tables for mirroring")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index 4b5b6618dff4..692fe9e6a08f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -198,7 +198,7 @@ int mlx5_esw_vport_tbl_get(struct mlx5_eswitch *esw)
 	mlx5_esw_for_all_vports(esw, i, vport) {
 		attr.in_rep->vport = vport->vport;
 		fdb = esw_vport_tbl_get(esw, &attr);
-		if (!fdb)
+		if (IS_ERR(fdb))
 			goto out;
 	}
 	return 0;
-- 
2.11.0


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

* Re: [PATCH] net/mlx5e: Fix an IS_ERR() vs NULL check
  2020-03-04 14:22 [PATCH] net/mlx5e: Fix an IS_ERR() vs NULL check Dan Carpenter
@ 2020-03-04 20:31 ` Saeed Mahameed
  2020-03-05  8:00   ` Dan Carpenter
  0 siblings, 1 reply; 4+ messages in thread
From: Saeed Mahameed @ 2020-03-04 20:31 UTC (permalink / raw)
  To: Eli Cohen, dan.carpenter@oracle.com
  Cc: kernel-janitors@vger.kernel.org, Mark Bloch, Paul Blakey,
	linux-rdma@vger.kernel.org, leon@kernel.org

On Wed, 2020-03-04 at 17:22 +0300, Dan Carpenter wrote:
> The esw_vport_tbl_get() function returns error pointers on error.
> 
> Fixes: 96e326878fa5 ("net/mlx5e: Eswitch, Use per vport tables for
> mirroring")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Hi Dan the patch looks fine, but you didn't cc netdev mailing list
Two options:

1) I can pick this patch up and repost it myself in a future pull
request
2) you can re-post it and cc netdev also mark it for net [PATCH net]

let me know what you prefer.

Thanks,
Saeed.


> ---
>  drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git
> a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
> b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
> index 4b5b6618dff4..692fe9e6a08f 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
> @@ -198,7 +198,7 @@ int mlx5_esw_vport_tbl_get(struct mlx5_eswitch
> *esw)
>  	mlx5_esw_for_all_vports(esw, i, vport) {
>  		attr.in_rep->vport = vport->vport;
>  		fdb = esw_vport_tbl_get(esw, &attr);
> -		if (!fdb)
> +		if (IS_ERR(fdb))
>  			goto out;
>  	}
>  	return 0;

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

* Re: [PATCH] net/mlx5e: Fix an IS_ERR() vs NULL check
  2020-03-04 20:31 ` Saeed Mahameed
@ 2020-03-05  8:00   ` Dan Carpenter
  2020-03-05 23:11     ` Saeed Mahameed
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2020-03-05  8:00 UTC (permalink / raw)
  To: Saeed Mahameed
  Cc: Eli Cohen, kernel-janitors@vger.kernel.org, Mark Bloch,
	Paul Blakey, linux-rdma@vger.kernel.org, leon@kernel.org

On Wed, Mar 04, 2020 at 08:31:13PM +0000, Saeed Mahameed wrote:
> On Wed, 2020-03-04 at 17:22 +0300, Dan Carpenter wrote:
> > The esw_vport_tbl_get() function returns error pointers on error.
> > 
> > Fixes: 96e326878fa5 ("net/mlx5e: Eswitch, Use per vport tables for
> > mirroring")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> Hi Dan the patch looks fine, but you didn't cc netdev mailing list
> Two options:
> 
> 1) I can pick this patch up and repost it myself in a future pull
> request

I assumed we would do this, because the original patch didn't have
Dave's signed-off-by.

> 2) you can re-post it and cc netdev also mark it for net [PATCH net]

If we were going to go that route then it would have to [PATCH net-next]
because it doesn't apply to the net tree.

regards,
dan carpenter



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

* Re: [PATCH] net/mlx5e: Fix an IS_ERR() vs NULL check
  2020-03-05  8:00   ` Dan Carpenter
@ 2020-03-05 23:11     ` Saeed Mahameed
  0 siblings, 0 replies; 4+ messages in thread
From: Saeed Mahameed @ 2020-03-05 23:11 UTC (permalink / raw)
  To: dan.carpenter@oracle.com
  Cc: Eli Cohen, kernel-janitors@vger.kernel.org, Mark Bloch,
	Paul Blakey, linux-rdma@vger.kernel.org, leon@kernel.org

On Thu, 2020-03-05 at 11:00 +0300, Dan Carpenter wrote:
> On Wed, Mar 04, 2020 at 08:31:13PM +0000, Saeed Mahameed wrote:
> > On Wed, 2020-03-04 at 17:22 +0300, Dan Carpenter wrote:
> > > The esw_vport_tbl_get() function returns error pointers on error.
> > > 
> > > Fixes: 96e326878fa5 ("net/mlx5e: Eswitch, Use per vport tables
> > > for
> > > mirroring")
> > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> > 
> > Hi Dan the patch looks fine, but you didn't cc netdev mailing list
> > Two options:
> > 
> > 1) I can pick this patch up and repost it myself in a future pull
> > request
> 
> I assumed we would do this, because the original patch didn't have
> Dave's signed-off-by.
> 

We maintain the net-next-mlx5 branch under netdev mailing list.

> > 2) you can re-post it and cc netdev also mark it for net [PATCH
> > net]
> 
> If we were going to go that route then it would have to [PATCH net-
> next]
> because it doesn't apply to the net tree.
> 

I see, i will take it myself to net-next-mlx5 and will submit to net-
next soon in my next pull request to dave.

Thanks,
Saeed.


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

end of thread, other threads:[~2020-03-05 23:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-04 14:22 [PATCH] net/mlx5e: Fix an IS_ERR() vs NULL check Dan Carpenter
2020-03-04 20:31 ` Saeed Mahameed
2020-03-05  8:00   ` Dan Carpenter
2020-03-05 23:11     ` Saeed Mahameed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox