From: Eric Biggers <ebiggers3@gmail.com>
To: pablo@netfilter.org
Cc: kaber@trash.net, kadlec@blackhole.kfki.hu, davem@davemloft.net,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Eric Biggers <ebiggers3@gmail.com>
Subject: [PATCH] netfilter: nft_ct: define nft_ct_get_eval_counter() only when needed
Date: Mon, 1 Feb 2016 20:30:57 -0600 [thread overview]
Message-ID: <1454380257-27195-1-git-send-email-ebiggers3@gmail.com> (raw)
This eliminates an "unused function" compiler warning when
CONFIG_NF_CONNTRACK_LABELS is not defined.
Signed-off-by: Eric Biggers <ebiggers3@gmail.com>
---
net/netfilter/nft_ct.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c
index a0eb216..3cd6b5b 100644
--- a/net/netfilter/nft_ct.c
+++ b/net/netfilter/nft_ct.c
@@ -31,6 +31,7 @@ struct nft_ct {
};
};
+#ifdef CONFIG_NF_CONNTRACK_LABELS
static u64 nft_ct_get_eval_counter(const struct nf_conn_counter *c,
enum nft_ct_keys k,
enum ip_conntrack_dir d)
@@ -42,6 +43,7 @@ static u64 nft_ct_get_eval_counter(const struct nf_conn_counter *c,
return nft_ct_get_eval_counter(c, k, IP_CT_DIR_ORIGINAL) +
nft_ct_get_eval_counter(c, k, IP_CT_DIR_REPLY);
}
+#endif
static void nft_ct_get_eval(const struct nft_expr *expr,
struct nft_regs *regs,
--
2.7.0
next reply other threads:[~2016-02-02 2:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-02 2:30 Eric Biggers [this message]
2016-02-02 4:19 ` [PATCH] netfilter: nft_ct: define nft_ct_get_eval_counter() only when needed Florian Westphal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1454380257-27195-1-git-send-email-ebiggers3@gmail.com \
--to=ebiggers3@gmail.com \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).