From patchwork Fri Jul 23 15:54:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pablo Neira Ayuso X-Patchwork-Id: 484626 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp1460406jao; Fri, 23 Jul 2021 08:54:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHRBn+NT3exWKJwbommRDRCuWtsb/OeTIwwnUHYgXET4iYUVEQyFg1fstB2tLTGySfxmUp X-Received: by 2002:aa7:da13:: with SMTP id r19mr6448668eds.252.1627055697795; Fri, 23 Jul 2021 08:54:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627055697; cv=none; d=google.com; s=arc-20160816; b=RWCpFiSoFoQrvzlhx5BVlgaMDNnp50pDeqV90BiqTwmOJpJdkvBdbnqKV0z8h5jBgi TTyi4Uuimb24Of++3ygg9OxKYbvk4/pXzDcWSpe5tQQW6/nRc7hQFWsqz9EJiyGcK2QI xTTrJ13qreObdSqZsoRQ3H48oCnJCn1ixzd3tZPPoyVdfntOpxwBhk4toWKKqVO5rkXk k9xbz4pjLrULXqDujfVQqwHaxS1ScDNRrrUZv+qOvXDXMZ38Ccxv5KlJSfH33+Da/1Rf RNsAZELqmVnAfgRmDEDapsXEA8YA9INBTgB9nUrOB+o2Ura6A1YrUCwx0LPJGrEzU8oI Ctjg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=cem4VhXdR+Duct8CZXmIlkiUZex7kKmptg+P9CrJ0qc=; b=PqTy/+w9eyQRjjAa1W134H7I01ZER/rqmTY5PuuTbhZgXubPayynFkQ3AUp0LpRaON 0yC4++bL5q+nj28MSLTzCW1RmIQdnZgF2DeNWI5TwYeCahj7PRtjXsNs3D8jRlHZh/7a Qf5Hfppqsli+iNpPX+Fh9VW/LXMklBE5xfgZetKqP4bcQJ57wDTIxKkkaA3bQMj81U/Y YdnccJEBErnT9NKsbX5ti75+RzhAdtCwOTOOmw1XRsSVhbz3346cLIqDVrtHj2lZ7RUx IA0qXE2rTcxYzy+ZPaDHF/QbpFwmureI8Iibd0SkDDA2r0I22cXAd6jhDIsruM4q6gMO 7uIQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ku4si34984615ejc.107.2021.07.23.08.54.56; Fri, 23 Jul 2021 08:54:57 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235778AbhGWPOJ (ORCPT + 8 others); Fri, 23 Jul 2021 11:14:09 -0400 Received: from mail.netfilter.org ([217.70.188.207]:57314 "EHLO mail.netfilter.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235685AbhGWPNz (ORCPT ); Fri, 23 Jul 2021 11:13:55 -0400 Received: from localhost.localdomain (unknown [78.30.39.111]) by mail.netfilter.org (Postfix) with ESMTPSA id 49B65642A5; Fri, 23 Jul 2021 17:53:57 +0200 (CEST) From: Pablo Neira Ayuso To: netfilter-devel@vger.kernel.org Cc: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org Subject: [PATCH net 6/6] netfilter: nfnl_hook: fix unused variable warning Date: Fri, 23 Jul 2021 17:54:12 +0200 Message-Id: <20210723155412.17916-7-pablo@netfilter.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210723155412.17916-1-pablo@netfilter.org> References: <20210723155412.17916-1-pablo@netfilter.org> 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 Signed-off-by: Pablo Neira Ayuso --- net/netfilter/nfnetlink_hook.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.20.1 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: