Skip to contentSkip to conversation

net/mlx5e: Remove unused variable

PATCH In review Arnd Bergmann 3 participants 3 messages Jan 19, 2017

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/mlx5e: Remove unused variable

A cleanup removed the only user of this variable

mlx5/core/en_ethtool.c: In function 'mlx5e_set_channels':
mlx5/core/en_ethtool.c:546:6: error: unused variable 'ncv' [-Werror=unused-variable]

Let's remove the declaration as well.

Fixes 639e9e94160e ("net/mlx5e: Remove unnecessary checks when setting num channels")
---
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +0 -1
index b1b9eb6ee135..5197817e4b2f 100644
@@ -543,7 +543,6 @@ static int mlx5e_set_channels(struct net_device *dev,
 			      struct ethtool_channels *ch)
 {
 	struct mlx5e_priv *priv = netdev_priv(dev);
-	int ncv = mlx5e_get_max_num_channels(priv->mdev);
 	unsigned int count = ch->combined_count;
 	bool arfs_enabled;
 	bool was_opened;
Signature · 1 line
2.9.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Arnd,

Quoted 18 lines · Arnd Bergmann

A cleanup removed the only user of this variable

mlx5/core/en_ethtool.c: In function 'mlx5e_set_channels':
mlx5/core/en_ethtool.c:546:6: error: unused variable 'ncv' [-Werror=unused-variable]

Let's remove the declaration as well.

Fixes 639e9e94160e ("net/mlx5e: Remove unnecessary checks when setting num channels")
---
  drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 1 -
  1 file changed, 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +0 -0
index b1b9eb6ee135..5197817e4b2f 100644

drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c static int mlx5e_set_channels(struct net_device *dev, · line 548

Quoted 7 lines
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +0 -1
@@ -543,7 +543,6 @@ static int mlx5e_set_channels(struct net_device *dev,
  			      struct ethtool_channels *ch)
  {
  	struct mlx5e_priv *priv = netdev_priv(dev);
-	int ncv = mlx5e_get_max_num_channels(priv->mdev);
  	unsigned int count = ch->combined_count;
  	bool arfs_enabled;
  	bool was_opened;

Thanks for the fix!

Regards,
Tariq

maintainer
#2 lore raw
In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>
Date: Thu, 19 Jan 2017 10:33:29 +0100

Quoted 9 lines

A cleanup removed the only user of this variable

mlx5/core/en_ethtool.c: In function 'mlx5e_set_channels':
mlx5/core/en_ethtool.c:546:6: error: unused variable 'ncv' [-Werror=unused-variable]

Let's remove the declaration as well.

Fixes 639e9e94160e ("net/mlx5e: Remove unnecessary checks when setting num channels")

Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html