Skip to content

Commit 74bd5d5

Browse files
arndbdavem330
authored andcommitted
net/mlx5e: hide an unused variable
The uplink_rpriv variable was added at the start of the function but only used inside of an #ifdef: drivers/net/ethernet/mellanox/mlx5/core/en_tc.c: In function 'mlx5e_route_lookup_ipv6': drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:1549:25: error: unused variable 'uplink_rpriv' [-Werror=unused-variable] This moves the declaration into that #ifdef as well. Fixes: 5ed99fb ("net/mlx5e: Move ethernet representors data into separate struct") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 72deacc commit 74bd5d5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/net/ethernet/mellanox/mlx5/core

‎drivers/net/ethernet/mellanox/mlx5/core/en_tc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1546,11 +1546,11 @@ static int mlx5e_route_lookup_ipv6(struct mlx5e_priv *priv,
15461546
struct neighbour **out_n,
15471547
int *out_ttl)
15481548
{
1549-
struct mlx5e_rep_priv *uplink_rpriv;
15501549
struct neighbour *n = NULL;
15511550
struct dst_entry *dst;
15521551

15531552
#if IS_ENABLED(CONFIG_INET) && IS_ENABLED(CONFIG_IPV6)
1553+
struct mlx5e_rep_priv *uplink_rpriv;
15541554
struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
15551555
int ret;
15561556

0 commit comments

Comments
 (0)