All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/mlx5e: Fix an IS_ERR() vs NULL check
@ 2020-03-04 14:22 ` Dan Carpenter
  0 siblings, 0 replies; 8+ 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] 8+ messages in thread

* [PATCH] net/mlx5e: Fix an IS_ERR() vs NULL check
@ 2020-03-04 14:22 ` Dan Carpenter
  0 siblings, 0 replies; 8+ 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] 8+ messages in thread

* Re: [PATCH] net/mlx5e: Fix an IS_ERR() vs NULL check
  2020-03-04 14:22 ` Dan Carpenter
@ 2020-03-04 20:31   ` Saeed Mahameed
  -1 siblings, 0 replies; 8+ 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

T24gV2VkLCAyMDIwLTAzLTA0IGF0IDE3OjIyICswMzAwLCBEYW4gQ2FycGVudGVyIHdyb3RlOg0K
PiBUaGUgZXN3X3Zwb3J0X3RibF9nZXQoKSBmdW5jdGlvbiByZXR1cm5zIGVycm9yIHBvaW50ZXJz
IG9uIGVycm9yLg0KPiANCj4gRml4ZXM6IDk2ZTMyNjg3OGZhNSAoIm5ldC9tbHg1ZTogRXN3aXRj
aCwgVXNlIHBlciB2cG9ydCB0YWJsZXMgZm9yDQo+IG1pcnJvcmluZyIpDQo+IFNpZ25lZC1vZmYt
Ynk6IERhbiBDY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IC0xOTgsNyAr
MTk4LDcgQEAgaW50IG1seDVfZXN3X3Zwb3J0X3RibF9nZXQoc3RydWN0IG1seDVfZXN3aXRjaA0K
PiAqZXN3KQ0KPiAgCW1seDVfZXN3X2Zvcl9hbGxfdnBvcnRzKGVzdywgaSwgdnBvcnQpIHsNCj4g
IAkJYXR0ci5pbl9yZXAtPnZwb3J0ID0gdnBvcnQtPnZwb3J0Ow0KPiAgCQlmZGIgPSBlc3dfdnBv
cnRfdGJsX2dldChlc3csICZhdHRyKTsNCj4gLQkJaWYgKCFmZGIpDQo+ICsJCWlmIChJU19FUlIo
ZmRiKSkNCj4gIAkJCWdvdG8gb3V0Ow0KPiAgCX0NCj4gIAlyZXR1cm4gMDsNCg=

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

* Re: [PATCH] net/mlx5e: Fix an IS_ERR() vs NULL check
@ 2020-03-04 20:31   ` Saeed Mahameed
  0 siblings, 0 replies; 8+ 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] 8+ 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
  -1 siblings, 0 replies; 8+ 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] 8+ messages in thread

* Re: [PATCH] net/mlx5e: Fix an IS_ERR() vs NULL check
@ 2020-03-05  8:00     ` Dan Carpenter
  0 siblings, 0 replies; 8+ 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] 8+ 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
  -1 siblings, 0 replies; 8+ 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

T24gVGh1LCAyMDIwLTAzLTA1IGF0IDExOjAwICswMzAwLCBEYW4gQ2FycGVudGVyIHdyb3RlOg0K
PiBPbiBXZWQsIE1hciAwNCwgMjAyMCBhdCAwODozMToxM1BNICswMDAwLCBTYWVlZCBNYWhhbWVl
ZCB3cm90ZToNCj4gPiBPbiBXZWQsIDIwMjAtMDMtMDQgYXQgMTc6MjIgKzAzMDAsIERhbiBDYXJw
ZW50ZXIgd3JvdGU6DQo+ID4gPiBUaGUgZXN3X3Zwb3J0X3R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seSB0byB0aGUgbmV0IHRyZWUuDQo+IA0KDQpJIHNlZSwgaSB3aWxsIHRha2UgaXQgbXlz
ZWxmIHRvIG5ldC1uZXh0LW1seDUgYW5kIHdpbGwgc3VibWl0IHRvIG5ldC0NCm5leHQgc29vbiBp
biBteSBuZXh0IHB1bGwgcmVxdWVzdCB0byBkYXZlLg0KDQpUaGFua3MsDQpTYWVlZC4NCg0K

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

* Re: [PATCH] net/mlx5e: Fix an IS_ERR() vs NULL check
@ 2020-03-05 23:11       ` Saeed Mahameed
  0 siblings, 0 replies; 8+ 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] 8+ messages in thread

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

Thread overview: 8+ 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 14:22 ` Dan Carpenter
2020-03-04 20:31 ` Saeed Mahameed
2020-03-04 20:31   ` Saeed Mahameed
2020-03-05  8:00   ` Dan Carpenter
2020-03-05  8:00     ` Dan Carpenter
2020-03-05 23:11     ` Saeed Mahameed
2020-03-05 23:11       ` Saeed Mahameed

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.