public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/mlx5e: hide an unused variable
@ 2018-01-03 22:40 Arnd Bergmann
       [not found] ` <20180103224022.3737385-1-arnd-r2nGTMty4D4@public.gmane.org>
  2018-01-05 15:56 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2018-01-03 22:40 UTC (permalink / raw)
  To: Saeed Mahameed, Matan Barak, Leon Romanovsky
  Cc: Arnd Bergmann, Or Gerlitz, Hadar Hen Zion, David S. Miller,
	Paul Blakey, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

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")
Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 25a8073f15d8..933275fe03b2 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -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;
 
-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/mlx5e: hide an unused variable
       [not found] ` <20180103224022.3737385-1-arnd-r2nGTMty4D4@public.gmane.org>
@ 2018-01-04  1:04   ` Saeed Mahameed
  0 siblings, 0 replies; 3+ messages in thread
From: Saeed Mahameed @ 2018-01-04  1:04 UTC (permalink / raw)
  To: Arnd Bergmann, Matan Barak, Leon Romanovsky
  Cc: Or Gerlitz, Hadar Hen Zion, David S. Miller, Paul Blakey,
	netdev-u79uwXL29TY76Z2rM5mHXA, linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA



On 1/3/2018 2:40 PM, Arnd Bergmann wrote:
> 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")
> Signed-off-by: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>

Acked-by: Saeed Mahameed <saeedm-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Thank you Arnd.

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/mlx5e: hide an unused variable
  2018-01-03 22:40 [PATCH] net/mlx5e: hide an unused variable Arnd Bergmann
       [not found] ` <20180103224022.3737385-1-arnd-r2nGTMty4D4@public.gmane.org>
@ 2018-01-05 15:56 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-01-05 15:56 UTC (permalink / raw)
  To: arnd
  Cc: saeedm, matanb, leonro, ogerlitz, hadarh, paulb, netdev,
	linux-rdma, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>
Date: Wed,  3 Jan 2018 23:40:11 +0100

> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-05 15:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-03 22:40 [PATCH] net/mlx5e: hide an unused variable Arnd Bergmann
     [not found] ` <20180103224022.3737385-1-arnd-r2nGTMty4D4@public.gmane.org>
2018-01-04  1:04   ` Saeed Mahameed
2018-01-05 15:56 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox