All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch -next] net/mlx5_core: fix an error code
@ 2015-06-11  8:50 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2015-06-11  8:50 UTC (permalink / raw)
  To: Eli Cohen, Amir Vadai; +Cc: netdev, linux-rdma, kernel-janitors

We return success if mlx5e_alloc_sq_db() fails but we should return an
error code.

Fixes: f62b8bb8f2d3 ('net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 7348c51..075e517 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -525,7 +525,8 @@ static int mlx5e_create_sq(struct mlx5e_channel *c,
 	sq->uar_map     = sq->uar.map;
 	sq->bf_buf_size = (1 << MLX5_CAP_GEN(mdev, log_bf_reg_size)) / 2;
 
-	if (mlx5e_alloc_sq_db(sq, cpu_to_node(c->cpu)))
+	err = mlx5e_alloc_sq_db(sq, cpu_to_node(c->cpu));
+	if (err)
 		goto err_sq_wq_destroy;
 
 	sq->txq = netdev_get_tx_queue(priv->netdev,

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

* [patch -next] net/mlx5_core: fix an error code
@ 2015-06-11  8:50 ` Dan Carpenter
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Carpenter @ 2015-06-11  8:50 UTC (permalink / raw)
  To: Eli Cohen, Amir Vadai; +Cc: netdev, linux-rdma, kernel-janitors

We return success if mlx5e_alloc_sq_db() fails but we should return an
error code.

Fixes: f62b8bb8f2d3 ('net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 7348c51..075e517 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -525,7 +525,8 @@ static int mlx5e_create_sq(struct mlx5e_channel *c,
 	sq->uar_map     = sq->uar.map;
 	sq->bf_buf_size = (1 << MLX5_CAP_GEN(mdev, log_bf_reg_size)) / 2;
 
-	if (mlx5e_alloc_sq_db(sq, cpu_to_node(c->cpu)))
+	err = mlx5e_alloc_sq_db(sq, cpu_to_node(c->cpu));
+	if (err)
 		goto err_sq_wq_destroy;
 
 	sq->txq = netdev_get_tx_queue(priv->netdev,

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

* Re: [patch -next] net/mlx5_core: fix an error code
  2015-06-11  8:50 ` Dan Carpenter
@ 2015-06-11 11:28   ` Or Gerlitz
  -1 siblings, 0 replies; 6+ messages in thread
From: Or Gerlitz @ 2015-06-11 11:28 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Eli Cohen, Amir Vadai, Linux Netdev List, linux-rdma,
	kernel-janitors, Saeed Mahameed, Achiad Shochat

On Thu, Jun 11, 2015 at 11:50 AM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> We return success if mlx5e_alloc_sq_db() fails but we should return an
> error code.
>
> Fixes: f62b8bb8f2d3 ('net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> index 7348c51..075e517 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> @@ -525,7 +525,8 @@ static int mlx5e_create_sq(struct mlx5e_channel *c,
>         sq->uar_map     = sq->uar.map;
>         sq->bf_buf_size = (1 << MLX5_CAP_GEN(mdev, log_bf_reg_size)) / 2;
>
> -       if (mlx5e_alloc_sq_db(sq, cpu_to_node(c->cpu)))
> +       err = mlx5e_alloc_sq_db(sq, cpu_to_node(c->cpu));
> +       if (err)
>                 goto err_sq_wq_destroy;
>
>         sq->txq = netdev_get_tx_queue(priv->netdev,

Dan, nice catch, the team here just handed me the same fix, but you
submitted 1st...

Acked-by: Or Gerlitz <ogerlitz@mellanox.com>

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

* Re: [patch -next] net/mlx5_core: fix an error code
@ 2015-06-11 11:28   ` Or Gerlitz
  0 siblings, 0 replies; 6+ messages in thread
From: Or Gerlitz @ 2015-06-11 11:28 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Eli Cohen, Amir Vadai, Linux Netdev List, linux-rdma,
	kernel-janitors, Saeed Mahameed, Achiad Shochat

On Thu, Jun 11, 2015 at 11:50 AM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
> We return success if mlx5e_alloc_sq_db() fails but we should return an
> error code.
>
> Fixes: f62b8bb8f2d3 ('net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> index 7348c51..075e517 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> @@ -525,7 +525,8 @@ static int mlx5e_create_sq(struct mlx5e_channel *c,
>         sq->uar_map     = sq->uar.map;
>         sq->bf_buf_size = (1 << MLX5_CAP_GEN(mdev, log_bf_reg_size)) / 2;
>
> -       if (mlx5e_alloc_sq_db(sq, cpu_to_node(c->cpu)))
> +       err = mlx5e_alloc_sq_db(sq, cpu_to_node(c->cpu));
> +       if (err)
>                 goto err_sq_wq_destroy;
>
>         sq->txq = netdev_get_tx_queue(priv->netdev,

Dan, nice catch, the team here just handed me the same fix, but you
submitted 1st...

Acked-by: Or Gerlitz <ogerlitz@mellanox.com>

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

* Re: [patch -next] net/mlx5_core: fix an error code
  2015-06-11  8:50 ` Dan Carpenter
@ 2015-06-11 23:13   ` David Miller
  -1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-06-11 23:13 UTC (permalink / raw)
  To: dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA
  Cc: eli-VPRAkNaXOzVWk0Htik3J/w, amirv-VPRAkNaXOzVWk0Htik3J/w,
	netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA

From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Date: Thu, 11 Jun 2015 11:50:01 +0300

> We return success if mlx5e_alloc_sq_db() fails but we should return an
> error code.
> 
> Fixes: f62b8bb8f2d3 ('net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality')
> Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

Applied, thanks Dan.
--
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] 6+ messages in thread

* Re: [patch -next] net/mlx5_core: fix an error code
@ 2015-06-11 23:13   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-06-11 23:13 UTC (permalink / raw)
  To: dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA
  Cc: eli-VPRAkNaXOzVWk0Htik3J/w, amirv-VPRAkNaXOzVWk0Htik3J/w,
	netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	kernel-janitors-u79uwXL29TY76Z2rM5mHXA

From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 11 Jun 2015 11:50:01 +0300

> We return success if mlx5e_alloc_sq_db() fails but we should return an
> error code.
> 
> Fixes: f62b8bb8f2d3 ('net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied, thanks Dan.

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

end of thread, other threads:[~2015-06-11 23:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-11  8:50 [patch -next] net/mlx5_core: fix an error code Dan Carpenter
2015-06-11  8:50 ` Dan Carpenter
2015-06-11 11:28 ` Or Gerlitz
2015-06-11 11:28   ` Or Gerlitz
2015-06-11 23:13 ` David Miller
2015-06-11 23:13   ` David Miller

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.