From patchwork Wed Jan 3 22:40:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10143613 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7BC446034B for ; Wed, 3 Jan 2018 22:40:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A5C729346 for ; Wed, 3 Jan 2018 22:40:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D3562936A; Wed, 3 Jan 2018 22:40:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBEBB29346 for ; Wed, 3 Jan 2018 22:40:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750913AbeACWkd (ORCPT ); Wed, 3 Jan 2018 17:40:33 -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 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue006 [212.227.15.129]) with ESMTPA (Nemesis) id 0LrUzJ-1etmmi34Sj-013KsM; Wed, 03 Jan 2018 23:40:25 +0100 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-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Saeed Mahameed --- 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;