Message ID | 20200304142151.qivcobp6ngrynb2p@kili.mountain (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | net/mlx5e: Fix an IS_ERR() vs NULL check | expand |
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;
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
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.
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;
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(-)