forked from luck/tmp_suning_uos_patched
net/mlx5e: Remove set but not used variable 'upriv'
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c: In function 'mlx5e_vport_rep_load':
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:1490:21: warning:
variable 'upriv' set but not used [-Wunused-but-set-variable]
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c: In function 'mlx5e_vport_rep_unload':
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c:1557:21: warning:
variable 'upriv' set but not used [-Wunused-but-set-variable]
It not used any more since commit ef381359e3
("net/mlx5e: Replace egdev with
indirect block notifications"). Also remove unused variable 'uplink_rpriv'
after this change.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
02e1dbe402
commit
c784a28b02
|
@ -1484,10 +1484,8 @@ mlx5e_nic_rep_unload(struct mlx5_eswitch_rep *rep)
|
|||
static int
|
||||
mlx5e_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
|
||||
{
|
||||
struct mlx5e_rep_priv *uplink_rpriv;
|
||||
struct mlx5e_rep_priv *rpriv;
|
||||
struct net_device *netdev;
|
||||
struct mlx5e_priv *upriv;
|
||||
int nch, err;
|
||||
|
||||
rpriv = kzalloc(sizeof(*rpriv), GFP_KERNEL);
|
||||
|
@ -1522,9 +1520,6 @@ mlx5e_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
|
|||
goto err_detach_netdev;
|
||||
}
|
||||
|
||||
uplink_rpriv = mlx5_eswitch_get_uplink_priv(dev->priv.eswitch, REP_ETH);
|
||||
upriv = netdev_priv(uplink_rpriv->netdev);
|
||||
|
||||
err = register_netdev(netdev);
|
||||
if (err) {
|
||||
pr_warn("Failed to register representor netdev for vport %d\n",
|
||||
|
@ -1552,14 +1547,9 @@ mlx5e_vport_rep_unload(struct mlx5_eswitch_rep *rep)
|
|||
struct mlx5e_rep_priv *rpriv = mlx5e_rep_to_rep_priv(rep);
|
||||
struct net_device *netdev = rpriv->netdev;
|
||||
struct mlx5e_priv *priv = netdev_priv(netdev);
|
||||
struct mlx5e_rep_priv *uplink_rpriv;
|
||||
void *ppriv = priv->ppriv;
|
||||
struct mlx5e_priv *upriv;
|
||||
|
||||
unregister_netdev(netdev);
|
||||
uplink_rpriv = mlx5_eswitch_get_uplink_priv(priv->mdev->priv.eswitch,
|
||||
REP_ETH);
|
||||
upriv = netdev_priv(uplink_rpriv->netdev);
|
||||
mlx5e_rep_neigh_cleanup(rpriv);
|
||||
mlx5e_detach_netdev(priv);
|
||||
mlx5e_destroy_netdev(priv);
|
||||
|
|
Loading…
Reference in New Issue
Block a user