Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1323722 > unrolled thread
| Started by | Eric Biggers <ebiggers3@gmail.com> |
|---|---|
| First post | 2016-02-02 03:40 +0100 |
| Last post | 2016-02-02 05:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] netfilter: nft_ct: define nft_ct_get_eval_counter() only when needed Eric Biggers <ebiggers3@gmail.com> - 2016-02-02 03:40 +0100
Re: [PATCH] netfilter: nft_ct: define nft_ct_get_eval_counter() only when needed Florian Westphal <fw@strlen.de> - 2016-02-02 05:20 +0100
| From | Eric Biggers <ebiggers3@gmail.com> |
|---|---|
| Date | 2016-02-02 03:40 +0100 |
| Subject | [PATCH] netfilter: nft_ct: define nft_ct_get_eval_counter() only when needed |
| Message-ID | <qXz2P-3Wf-33@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Florian Westphal <fw@strlen.de> |
|---|---|
| Date | 2016-02-02 05:20 +0100 |
| Subject | Re: [PATCH] netfilter: nft_ct: define nft_ct_get_eval_counter() only when needed |
| Message-ID | <qXABz-5fp-1@gated-at.bofh.it> |
| In reply to | #1323722 |
Eric Biggers <ebiggers3@gmail.com> wrote: > This eliminates an "unused function" compiler warning when > CONFIG_NF_CONNTRACK_LABELS is not defined. > > Signed-off-by: Eric Biggers <ebiggers3@gmail.com> The nft_ct_get_eval_counter call should've been unconditional. The #endif placement is wrong: https://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit?id=efaea94aaf0decd55b15aa7068d4d516a352e56e
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web