From patchwork Wed Jul 21 15:22:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12391271 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7004C636C9 for ; Wed, 21 Jul 2021 15:22:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9E8EE61245 for ; Wed, 21 Jul 2021 15:22:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239799AbhGUOmP (ORCPT ); Wed, 21 Jul 2021 10:42:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:34284 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232808AbhGUOmO (ORCPT ); Wed, 21 Jul 2021 10:42:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 61E8260E0C; Wed, 21 Jul 2021 15:22:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626880970; bh=aoqDbVP+cfiPfy+Iu+/m5AKWZ/c2lRCRQKAI31Td0ro=; h=From:To:Cc:Subject:Date:From; b=TlPjuiG8q9lc0tPL8lMjFYuCjsGc4OrJ1Ou9Sd9C77K2T0yyM9c1MDtFlWBeqhRrr D0QMZkP5ia9nIJjzrdt6+sKxRQ3SbodEFoC0+0BFV6/FvLBDSxXx6EZjkjdUdUewQQ 5GBHDh3W9CehL2R2lAJpBF7wywQBaLO7Po3sc182r6D3JqqmEDMDLy2Np7GsYKr1X6 lYUj3s2Yo3Barho8yPJhMO7bpQXrOLvGy2Teghr2MnTgNGBHpThh6jGtLLernHxNbT I/VmX6beM6+FwoggA5d1HgRpPpuz7a4rB0ZgB3u+B++gWKpoe8XyBcRGg033CMgcqU p/7YonQjckl+w== From: Arnd Bergmann To: Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , Dan Carpenter , Colin Ian King , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] netfilter: nfnl_hook: fix unused variable warning Date: Wed, 21 Jul 2021 17:22:32 +0200 Message-Id: <20210721152245.2751702-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Arnd Bergmann The only user of this variable is in an #ifdef: net/netfilter/nfnetlink_hook.c: In function 'nfnl_hook_entries_head': net/netfilter/nfnetlink_hook.c:177:28: error: unused variable 'netdev' [-Werror=unused-variable] Fixes: e2cf17d3774c ("netfilter: add new hook nfnl subsystem") Signed-off-by: Arnd Bergmann --- net/netfilter/nfnetlink_hook.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/netfilter/nfnetlink_hook.c b/net/netfilter/nfnetlink_hook.c index 50b4e3c9347a..202f57d17bab 100644 --- a/net/netfilter/nfnetlink_hook.c +++ b/net/netfilter/nfnetlink_hook.c @@ -174,7 +174,9 @@ static const struct nf_hook_entries * nfnl_hook_entries_head(u8 pf, unsigned int hook, struct net *net, const char *dev) { const struct nf_hook_entries *hook_head = NULL; +#ifdef CONFIG_NETFILTER_INGRESS struct net_device *netdev; +#endif switch (pf) { case NFPROTO_IPV4: