Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751617AbeACWke (ORCPT + 1 other); Wed, 3 Jan 2018 17:40:34 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:52269 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751338AbeACWkc (ORCPT ); Wed, 3 Jan 2018 17:40:32 -0500 From: Arnd Bergmann To: Saeed Mahameed , Matan Barak , Leon Romanovsky Cc: Arnd Bergmann , Or Gerlitz , Hadar Hen Zion , "David S. Miller" , Paul Blakey , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net/mlx5e: hide an unused variable Date: Wed, 3 Jan 2018 23:40:11 +0100 Message-Id: <20180103224022.3737385-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:2ULzi9fuYNjix6rpDnr995+owW5A29MjUJ+BewQmmJfXqHPeGxp iSCV2JLyjfk2vf05SWakMoODyzuwMP3/wJu7RkX5lrz8hLkbrRDgsy62H9vEILyA2NSEMfw fyAqGEiS5NaPgxNWactIc99XhBz/2CNPJYXJWrH32ubkE/HKKJuL2DN2DkmdrrsDBhe5RHt AY2aM9J026H3lEx457zcw== X-UI-Out-Filterresults: notjunk:1;V01:K0:2PBodtU1lN0=:4ingLKNXLN8fnKXdpldEgK SFlFP7rY1GqDDZ0Wb3muoIx94tls8WigzBDsTAApO2HGskHuJ7p3/zDKFDpLiU1pgxtKeF5S7 7sYjSmxqs/uyZ4g3QaEip/jXRvnBC8P3LuhsQtr8gp5w1F+rGH32Noz+Mqa3kLlh9Of3vFRdK Azpak8hSVeuX5mso0hg1VIjXVfViq9dukPnWCp0Xkq29oWfmkXK70wg9JddfPyDcpx2XLWBxb 9NKmfVWEb2pLt7sEYM8kSnL6DHgoeb27JN2HSKy75GVlMOStol+Ka1CTiW0Mrag0V04zQ4I0y 7f+aYq9yPqK60WO8svJ2+r7UTQbLenVqYI3ypq0BYlv0/ST0iV2CstzS1cQLEh2VwRi6J06Pn 18g2Cvhz8QVBwfBUlBaZ7mXdpZw5m4R3cYYIY9c/v/JNVNNzAZKbpFsAD6fGMqBiIC+bXh5nw UBNcYs9OoemfXNFXZbBJLHyrsLroz0TrhxmySFat79sV2b+dkznRN8XC7yh7e1hL1vks3O/ia 8923vZHte5HMFI9dS5Qre0zWBzLTfxHu9Q5ttNnVje02NfAURMO1M8KmN7LFpdNymSV7X67I3 Fw7ig2DuFUOMNOWYizqdBPYmgqNC4IPwJ552QHVrOd8x1JtmAyxLBAXHZf1Y8oSHQ+3zXMgLI PKfkLC9l40vqswY0lSldUv/LGgbZKLmHDUgMie/D5S3/KdN3jM2KjzzWKxgxLAZ0gA1P54sGt C66r806gsf1hoXAwwzGNpEH3BAwqhboMzRzsHA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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 --- 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