[v2,01/28] net/mlx5: remove redundant item from union

Message ID 1563807145-16577-2-git-send-email-matan@mellanox.com (mailing list archive)
State Accepted, archived
Delegated to: Raslan Darawsheh
Headers
Series net/mlx5: support LRO |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Matan Azrad July 22, 2019, 2:51 p.m. UTC
  From: Dekel Peled <dekelp@mellanox.com>

A variable of type struct ibv_cq_ex is declared in 2 unions, but
isn't used.
This patch removes the 2 redundant declarations.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 1 -
 drivers/net/mlx5/mlx5_txq.c | 1 -
 2 files changed, 2 deletions(-)
  

Comments

Ferruh Yigit July 23, 2019, 10:53 a.m. UTC | #1
On 7/22/2019 3:51 PM, Matan Azrad wrote:
> From: Dekel Peled <dekelp@mellanox.com>
> 
> A variable of type struct ibv_cq_ex is declared in 2 unions, but
> isn't used.
> This patch removes the 2 redundant declarations.
This is not a fix, but I think it still make sense to request backporting these
kind of refactoring too,

1) It won't hurt to have these cleanups in the LTS
2) Not getting them potentially may cause conflicts for actual fixes in long
run. This is small change on its own, but when these kind of changes accumulated
it may make difference.

cc'ed LTS maintainers in case I am missing a point.

> 
> Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> Acked-by: Matan Azrad <matan@mellanox.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_rxq.c | 1 -
>  drivers/net/mlx5/mlx5_txq.c | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
> index 39b8b7a..0535ce3 100644
> --- a/drivers/net/mlx5/mlx5_rxq.c
> +++ b/drivers/net/mlx5/mlx5_rxq.c
> @@ -839,7 +839,6 @@ struct mlx5_rxq_ibv *
>  			struct mlx5dv_wq_init_attr mlx5;
>  #endif
>  		} wq;
> -		struct ibv_cq_ex cq_attr;
>  	} attr;
>  	unsigned int cqe_n;
>  	unsigned int wqe_n = 1 << rxq_data->elts_n;
> diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
> index 2f3aa5b..dbad361 100644
> --- a/drivers/net/mlx5/mlx5_txq.c
> +++ b/drivers/net/mlx5/mlx5_txq.c
> @@ -388,7 +388,6 @@ struct mlx5_txq_ibv *
>  		struct ibv_qp_init_attr_ex init;
>  		struct ibv_cq_init_attr_ex cq;
>  		struct ibv_qp_attr mod;
> -		struct ibv_cq_ex cq_attr;
>  	} attr;
>  	unsigned int cqe_n;
>  	struct mlx5dv_qp qp = { .comp_mask = MLX5DV_QP_MASK_UAR_MMAP_OFFSET };
>
  
Matan Azrad July 23, 2019, 12:10 p.m. UTC | #2
Hi Ferruh

 From: Ferruh Yigit 
> On 7/22/2019 3:51 PM, Matan Azrad wrote:
> > From: Dekel Peled <dekelp@mellanox.com>
> >
> > A variable of type struct ibv_cq_ex is declared in 2 unions, but isn't
> > used.
> > This patch removes the 2 redundant declarations.
> This is not a fix, but I think it still make sense to request backporting these
> kind of refactoring too,
> 
> 1) It won't hurt to have these cleanups in the LTS
> 2) Not getting them potentially may cause conflicts for actual fixes in long
> run. This is small change on its own, but when these kind of changes
> accumulated it may make difference.
> 
> cc'ed LTS maintainers in case I am missing a point.
> 
Agree.
You can add it for stable releases.

Matan.

> >
> > Signed-off-by: Dekel Peled <dekelp@mellanox.com>
> > Acked-by: Matan Azrad <matan@mellanox.com>
> > Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
> > ---
> >  drivers/net/mlx5/mlx5_rxq.c | 1 -
> >  drivers/net/mlx5/mlx5_txq.c | 1 -
> >  2 files changed, 2 deletions(-)
> >
> > diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
> > index 39b8b7a..0535ce3 100644
> > --- a/drivers/net/mlx5/mlx5_rxq.c
> > +++ b/drivers/net/mlx5/mlx5_rxq.c
> > @@ -839,7 +839,6 @@ struct mlx5_rxq_ibv *
> >  			struct mlx5dv_wq_init_attr mlx5;
> >  #endif
> >  		} wq;
> > -		struct ibv_cq_ex cq_attr;
> >  	} attr;
> >  	unsigned int cqe_n;
> >  	unsigned int wqe_n = 1 << rxq_data->elts_n; diff --git
> > a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index
> > 2f3aa5b..dbad361 100644
> > --- a/drivers/net/mlx5/mlx5_txq.c
> > +++ b/drivers/net/mlx5/mlx5_txq.c
> > @@ -388,7 +388,6 @@ struct mlx5_txq_ibv *
> >  		struct ibv_qp_init_attr_ex init;
> >  		struct ibv_cq_init_attr_ex cq;
> >  		struct ibv_qp_attr mod;
> > -		struct ibv_cq_ex cq_attr;
> >  	} attr;
> >  	unsigned int cqe_n;
> >  	struct mlx5dv_qp qp = { .comp_mask =
> MLX5DV_QP_MASK_UAR_MMAP_OFFSET
> > };
> >
  

Patch

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 39b8b7a..0535ce3 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -839,7 +839,6 @@  struct mlx5_rxq_ibv *
 			struct mlx5dv_wq_init_attr mlx5;
 #endif
 		} wq;
-		struct ibv_cq_ex cq_attr;
 	} attr;
 	unsigned int cqe_n;
 	unsigned int wqe_n = 1 << rxq_data->elts_n;
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 2f3aa5b..dbad361 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -388,7 +388,6 @@  struct mlx5_txq_ibv *
 		struct ibv_qp_init_attr_ex init;
 		struct ibv_cq_init_attr_ex cq;
 		struct ibv_qp_attr mod;
-		struct ibv_cq_ex cq_attr;
 	} attr;
 	unsigned int cqe_n;
 	struct mlx5dv_qp qp = { .comp_mask = MLX5DV_QP_MASK_UAR_MMAP_OFFSET };