diff mbox series

[v2] net/mlx5: Delete unneeded function argument

Message ID 20180815150854.30993-1-yuval.shaia@oracle.com (mailing list archive)
State Not Applicable
Headers show
Series [v2] net/mlx5: Delete unneeded function argument | expand

Commit Message

Yuval Shaia Aug. 15, 2018, 3:08 p.m. UTC
priv argument is not used by the function, delete it.

Fixes: a89842811ea98 ("net/mlx5e: Merge per priority stats groups")
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
---
v1 -> v2:
	* Remove blank line as pointed by Leon.
---
 drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Gal Pressman Aug. 16, 2018, 6:41 a.m. UTC | #1
On 15-Aug-18 18:08, Yuval Shaia wrote:
> priv argument is not used by the function, delete it.
> 
> Fixes: a89842811ea98 ("net/mlx5e: Merge per priority stats groups")
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>

nit: prefix should be net/mlx5e.

> ---
> v1 -> v2:
> 	* Remove blank line as pointed by Leon.
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
> index 1646859974ce..4c4d779dafa8 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
> @@ -813,7 +813,7 @@ static const struct counter_desc pport_per_prio_traffic_stats_desc[] = {
>  
>  #define NUM_PPORT_PER_PRIO_TRAFFIC_COUNTERS	ARRAY_SIZE(pport_per_prio_traffic_stats_desc)
>  
> -static int mlx5e_grp_per_prio_traffic_get_num_stats(struct mlx5e_priv *priv)
> +static int mlx5e_grp_per_prio_traffic_get_num_stats(void)
>  {
>  	return NUM_PPORT_PER_PRIO_TRAFFIC_COUNTERS * NUM_PPORT_PRIO;
>  }
> @@ -971,7 +971,7 @@ static int mlx5e_grp_per_prio_pfc_fill_stats(struct mlx5e_priv *priv,
>  
>  static int mlx5e_grp_per_prio_get_num_stats(struct mlx5e_priv *priv)
>  {
> -	return mlx5e_grp_per_prio_traffic_get_num_stats(priv) +
> +	return mlx5e_grp_per_prio_traffic_get_num_stats() +
>  		mlx5e_grp_per_prio_pfc_get_num_stats(priv);
>  }
>  
>
Yuval Shaia Aug. 16, 2018, 9 a.m. UTC | #2
On Thu, Aug 16, 2018 at 09:41:34AM +0300, Gal Pressman wrote:
> On 15-Aug-18 18:08, Yuval Shaia wrote:
> > priv argument is not used by the function, delete it.
> > 
> > Fixes: a89842811ea98 ("net/mlx5e: Merge per priority stats groups")
> > Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
> 
> nit: prefix should be net/mlx5e.

1. Will do.
2. Why? (asking since dir name is mlx5)

> 
> > ---
> > v1 -> v2:
> > 	* Remove blank line as pointed by Leon.
> > ---
> >  drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
> > index 1646859974ce..4c4d779dafa8 100644
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
> > @@ -813,7 +813,7 @@ static const struct counter_desc pport_per_prio_traffic_stats_desc[] = {
> >  
> >  #define NUM_PPORT_PER_PRIO_TRAFFIC_COUNTERS	ARRAY_SIZE(pport_per_prio_traffic_stats_desc)
> >  
> > -static int mlx5e_grp_per_prio_traffic_get_num_stats(struct mlx5e_priv *priv)
> > +static int mlx5e_grp_per_prio_traffic_get_num_stats(void)
> >  {
> >  	return NUM_PPORT_PER_PRIO_TRAFFIC_COUNTERS * NUM_PPORT_PRIO;
> >  }
> > @@ -971,7 +971,7 @@ static int mlx5e_grp_per_prio_pfc_fill_stats(struct mlx5e_priv *priv,
> >  
> >  static int mlx5e_grp_per_prio_get_num_stats(struct mlx5e_priv *priv)
> >  {
> > -	return mlx5e_grp_per_prio_traffic_get_num_stats(priv) +
> > +	return mlx5e_grp_per_prio_traffic_get_num_stats() +
> >  		mlx5e_grp_per_prio_pfc_get_num_stats(priv);
> >  }
> >  
> > 
>
Gal Pressman Aug. 16, 2018, 10:31 a.m. UTC | #3
On 16-Aug-18 12:00, Yuval Shaia wrote:
> On Thu, Aug 16, 2018 at 09:41:34AM +0300, Gal Pressman wrote:
>> On 15-Aug-18 18:08, Yuval Shaia wrote:
>>> priv argument is not used by the function, delete it.
>>>
>>> Fixes: a89842811ea98 ("net/mlx5e: Merge per priority stats groups")
>>> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
>>
>> nit: prefix should be net/mlx5e.
> 
> 1. Will do.
> 2. Why? (asking since dir name is mlx5)

Core related changes use net/mlx5 prefix, Ethernet related changes (en_* files) use net/mlx5e prefix.
Same thought goes into function names prefix (mlx5_*/mlx5e_*).

> 
>>
>>> ---
>>> v1 -> v2:
>>> 	* Remove blank line as pointed by Leon.
>>> ---
>>>  drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 4 ++--
>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
>>> index 1646859974ce..4c4d779dafa8 100644
>>> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
>>> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
>>> @@ -813,7 +813,7 @@ static const struct counter_desc pport_per_prio_traffic_stats_desc[] = {
>>>  
>>>  #define NUM_PPORT_PER_PRIO_TRAFFIC_COUNTERS	ARRAY_SIZE(pport_per_prio_traffic_stats_desc)
>>>  
>>> -static int mlx5e_grp_per_prio_traffic_get_num_stats(struct mlx5e_priv *priv)
>>> +static int mlx5e_grp_per_prio_traffic_get_num_stats(void)
>>>  {
>>>  	return NUM_PPORT_PER_PRIO_TRAFFIC_COUNTERS * NUM_PPORT_PRIO;
>>>  }
>>> @@ -971,7 +971,7 @@ static int mlx5e_grp_per_prio_pfc_fill_stats(struct mlx5e_priv *priv,
>>>  
>>>  static int mlx5e_grp_per_prio_get_num_stats(struct mlx5e_priv *priv)
>>>  {
>>> -	return mlx5e_grp_per_prio_traffic_get_num_stats(priv) +
>>> +	return mlx5e_grp_per_prio_traffic_get_num_stats() +
>>>  		mlx5e_grp_per_prio_pfc_get_num_stats(priv);
>>>  }
>>>  
>>>
>>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
index 1646859974ce..4c4d779dafa8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
@@ -813,7 +813,7 @@  static const struct counter_desc pport_per_prio_traffic_stats_desc[] = {
 
 #define NUM_PPORT_PER_PRIO_TRAFFIC_COUNTERS	ARRAY_SIZE(pport_per_prio_traffic_stats_desc)
 
-static int mlx5e_grp_per_prio_traffic_get_num_stats(struct mlx5e_priv *priv)
+static int mlx5e_grp_per_prio_traffic_get_num_stats(void)
 {
 	return NUM_PPORT_PER_PRIO_TRAFFIC_COUNTERS * NUM_PPORT_PRIO;
 }
@@ -971,7 +971,7 @@  static int mlx5e_grp_per_prio_pfc_fill_stats(struct mlx5e_priv *priv,
 
 static int mlx5e_grp_per_prio_get_num_stats(struct mlx5e_priv *priv)
 {
-	return mlx5e_grp_per_prio_traffic_get_num_stats(priv) +
+	return mlx5e_grp_per_prio_traffic_get_num_stats() +
 		mlx5e_grp_per_prio_pfc_get_num_stats(priv);
 }