Skip to contentSkip to conversation

net/mlx5e: hide an unused variable

PATCH Applied Arnd Bergmann 3 participants 3 messages Jan 3, 2018 – Jan 5, 2018

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

PATCH 1/1 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 5ed99fb421d4 ("net/mlx5e: Move ethernet representors data into separate struct")
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +1 -1
index 25a8073f15d8..933275fe03b2 100644
@@ -1546,11 +1546,11 @@ static int mlx5e_route_lookup_ipv6(struct mlx5e_priv *priv,
 				   struct neighbour **out_n,
 				   int *out_ttl)
 {
-	struct mlx5e_rep_priv *uplink_rpriv;
 	struct neighbour *n = NULL;
 	struct dst_entry *dst;
 
 #if IS_ENABLED(CONFIG_INET) && IS_ENABLED(CONFIG_IPV6)
+	struct mlx5e_rep_priv *uplink_rpriv;
 	struct mlx5_eswitch *esw = priv->mdev->priv.eswitch;
 	int ret;
 
Signature · 6 lines
2.9.0

--
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
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Arnd Bergmann

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 5ed99fb421d4 ("net/mlx5e: Move ethernet representors data into separate struct")

Thank you Arnd.

--
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

maintainer Applied
#2 lore raw
In reply to Arnd Bergmann

From: Arnd Bergmann <[email protected]>
Date: Wed, 3 Jan 2018 23:40:11 +0100

Quoted 10 lines

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 5ed99fb421d4 ("net/mlx5e: Move ethernet representors data into separate struct")

Applied.

Please make it clear which tree you are targetting in your Subject lines in the future. This should have been "[PATCH net-next] ...".