From patchwork Fri Jul 12 08:57:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 168910 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp587924ilk; Fri, 12 Jul 2019 01:58:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1ku1iUbwB+PBY+/qmwsIQ448u1v8eApa5D0C7ow4jYOl7mFWG3DZXxItePjU8MzUO+rMS X-Received: by 2002:a17:90a:5288:: with SMTP id w8mr10373016pjh.61.1562921919989; Fri, 12 Jul 2019 01:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562921919; cv=none; d=google.com; s=arc-20160816; b=lXodb0imUDIjmdHGmep2e2MgIsKRRt2hc5+owvnCLBnX+ikTiWwPDc+4h7KkN/4ElP ubMJKYydpPzlmMUsm2fk7WdNlc9r7yVYrUSHrmxcNp8ldEQSf6hb64pzMkhz/pYrGvcp uOKzMXDjKJvtLc57SVJtrW0aHpYEHy9xMmiRDRuMwkOQuW2c8OxthsOD7dSIU9luYhwb ntZUBLYRdtAAvJDpeLvIoFUhzy4ZCZr30A9jFNLDRc8QNQXpG0hZ67qpzu4uFof76WL0 FflFSZ4JM+dGDBKkypZpBCpMM0Wxmnjqm2okYmEP0G6tCjTdQyys47vhfzl/H4n6EF7s sf1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=+GdGGNBW7o3DMGRHzEcOf1Z5oduFIRSrEj6efEdyX68=; b=RUVVXJxbuvWj5Pv3PZk9Khe+4vy6KuRnehNyh6uPqgeWp9YXmVc7cz9doeT4e3TSAh mU4HTpPGy+VLUmEX1pxS+JqlsILHNQBLUtvh/3DZbTAMIQLtMDiKDnmZDoFaeIdVfHAn 7/0Zsj85icwq11yVG5euE1UIgCnYKCv1NSy3HIZKpE1ovDDTMydO6/W4+cN4007PPJ3T aueU8SYZOuUfbRN0Y+XJj2KTFaCKH2wuISGkGWuXW9t0QHClPuxiZLukwUX0Rttv3HA9 jNk6gMkGokF/XVNl9buUGTD/nLiYye6RBJmaPZWQLJJn1AMT1v+BWvYlEPonqNaVz6TR f81w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t63si7651731pfb.5.2019.07.12.01.58.39; Fri, 12 Jul 2019 01:58:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726211AbfGLI6i (ORCPT + 29 others); Fri, 12 Jul 2019 04:58:38 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:57965 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726083AbfGLI6h (ORCPT ); Fri, 12 Jul 2019 04:58:37 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1N0qmr-1iiWJC3sCj-00wj0T; Fri, 12 Jul 2019 10:58:28 +0200 From: Arnd Bergmann To: Saeed Mahameed , Leon Romanovsky , "David S. Miller" Cc: Arnd Bergmann , Pablo Neira Ayuso , Jakub Kicinski , Tariq Toukan , Or Gerlitz , Maxim Mikityanskiy , Eran Ben Elisha , Aya Levin , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [net-next, netfilter] mlx5: avoid unused variable warning Date: Fri, 12 Jul 2019 10:57:11 +0200 Message-Id: <20190712085823.4111911-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:KbtTIUVijtjWb2BGudzBahmvRgrYsk9J81pM88PMcX4hIYF1S8L gwuD9vu1/nn6juu36bk9dM41BjnCzdAVdK1XblUpEIspkI+qFHDNupUopxdq+3WLf1KVgv4 +eqnbxE9wGcbCeUugh7J1Lja5qJJ+Fz8cN/Elk8vdykzSlN6SdCcq+TxeKYaPEj2Qur3Auq BDDOpD5PUD3weUNF7oVgw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:FvCGFSTd6E0=:asyyPiZ2WEID0yTUfqlLkO yDK9Trl6uOm5d4YOn38xx94BXBWk0eyHyhwG71UAts4NggelRuwSXc0MfaGT5jqdP9CkeuEwN wt9V90ChT8C+pLT+3PGVkWwcmmBBTDdHohOGOvIRVoPjMkj9sIHd6zK4pMlh4E9C6C+9D91Cv yP3Ky9REc91p0PoVMUib72W9zesKLaQHN+CB7AkG6Yd60RAF6g0XdCEW09LsN4tpvP0Yrsdcj oQBwED5oIRUaPH91IPJMaHYGUiBZYdeuAJhXPeqZfHHGeQ3LOnEkK901r3pvLkEclXfIIAXqg gRVoZQHm8g3XI6Uwl+yTo5jinQfenLrHn3clvliWJhwSOB3VJrgp1k9VRuX4T/vkCZH4pu4LB q0a8HgxA+CiEGuW9srVOozgJMuWwhYo5bSQiNceysbAHwVqfTnCIjAGGB6gYNH/yCnkM2h3hL S7bOf1/vTswustC+kCwhLhK0wmZZ8XYdLeUyG4upeGBZCfoh2MKQDkQV6QJZGgeLF78s9S16n ESm5pZt93aF60xeNyYLSvbVj6FePTfWI5P3YXy4GW34D6WrqI4dpj3YZzj/LESubYXw4JjvEi If4AhulwrRCJtCi/31aPfsyUYJS5HuBRU8nG6IcY15NRLSI4UXFkZlXrF/rqZGvrJpG6srDlO +A45Y/isoJWIsK93EgPxm+Iex5Qdj4gnHfT47T4Zj344PWeqeNsSeBiVPq3MrtxMfwKgjVL13 FxXXpAQVrySO3Ci8uABOfS8yEwOFgfxsFk/S+w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Without CONFIG_MLX5_ESWITCH we get a harmless warning: drivers/net/ethernet/mellanox/mlx5/core/en_main.c:3467:21: error: unused variable 'priv' [-Werror,-Wunused-variable] struct mlx5e_priv *priv = netdev_priv(dev); Hide the declaration in the same #ifdef as its usage. Fixes: 4e95bc268b91 ("net: flow_offload: add flow_block_cb_setup_simple()") Signed-off-by: Arnd Bergmann --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.0 diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 6d0ae87c8ded..b562ba904ea1 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -3464,7 +3464,9 @@ static LIST_HEAD(mlx5e_block_cb_list); static int mlx5e_setup_tc(struct net_device *dev, enum tc_setup_type type, void *type_data) { +#ifdef CONFIG_MLX5_ESWITCH struct mlx5e_priv *priv = netdev_priv(dev); +#endif switch (type) { #ifdef CONFIG_MLX5_ESWITCH