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: 483314 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp6297875jao; Wed, 21 Jul 2021 08:22:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhw4Ux8k86Um5Mkb7xgci1CBUr30+b1lnFy+3x8/TpO14v4cjeZQYxPnG8yzLIoSXVfQJC X-Received: by 2002:a17:906:6d45:: with SMTP id a5mr3516290ejt.299.1626880975389; Wed, 21 Jul 2021 08:22:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626880975; cv=none; d=google.com; s=arc-20160816; b=xeqbh4XxJG5UQRZuL4//ZuKKXvTbmod434jkxwnB7zzmvOiOgsTF4+DVYdapLjV5k4 SocklvoS7LcRsuRsXAOzhh+hbkCYJXIkr0Cyw5f7KX9fkhTotMfElnER2in1MXBJBdrw xahc+SNR7uRyXwzlk5G050R2hnn4z8/9WYMTjR58xK1Jqc5QpBoGGteFm93vLcUTor/A PLfekiQqKCSvuDTT348ZIYG4hsSbpmKYwuM8Vf7l778M0q65oRuP+sZss2g1fnosm/IT 9WJ7OU754NSwdJvsePHwq10sWJGhHKiJLfZa1YxeHwHeZFD/4USiSnbOI8NyEnB/l/de Ga1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=FSoY/Dr1iB2Z2UX3X7GadvDynNJkLolEXAiKaM3U9D4=; b=0yHcz0jwJJ1uJQq9NmWEwrSXaIobhxUyAA+aMk+oUth83+2XNnUtJXGpPXVHWQ1IHN XOCw5mjj0x0hJntxvYDg51kMPxHOhbuEJ1+mdNj206O3s8kdMElQsXhVi64C6vc58Bfc mY8t27amahpMgFo4vDkL1H6EDxnLZKmT90TsKU5yyMdZTkYX7yOZZPCIEKj23g3wWVPB yeNKiy5G6CxlF9kXQoQ6O8VJScHnpKIrnSiJnTsNod5Qq/Wdneo6LMoR5tw4yFnYZr77 J7+iIOHI9aylp7bFzLG67cuYnBpTpxW7L6vfK7h8ugHoxbofeFtUKRYsEXQQRocDTglu Kbqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TlPjuiG8; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g22si3052040ejr.559.2021.07.21.08.22.55; Wed, 21 Jul 2021 08:22:55 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TlPjuiG8; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239799AbhGUOmP (ORCPT + 8 others); 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 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(+) -- 2.29.2 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: