From: Arnd Bergmann <arnd@arndb.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Patrick McHardy <kaber@trash.net>,
Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
"David S. Miller" <davem@davemloft.net>,
netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Florian Westphal <fw@strlen.de>
Subject: [PATCH] netfilter: nft_ct: mark nft_ct_get_eval_counter __maybe_unused
Date: Wed, 13 Jan 2016 14:58:11 +0100 [thread overview]
Message-ID: <6200241.eeH6DHXzHj@wuerfel> (raw)
The newly added nft_ct_get_eval_counter() function is only used when
CONFIG_NF_CONNTRACK_LABELS is set, otherwise gcc warns about the
unused definition:
netfilter/nft_ct.c:34:12: warning: 'nft_ct_get_eval_counter' defined but not used [-Wunused-function]
static u64 nft_ct_get_eval_counter(const struct nf_conn_counter *c,
This marks the function __maybe_unused to shut up the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 48f66c905a97 ("netfilter: nft_ct: add byte/packet counter support")
---
Found on ARM randconfig builds this week
diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c
index a0eb2161e3ef..3496929bbc54 100644
--- a/net/netfilter/nft_ct.c
+++ b/net/netfilter/nft_ct.c
@@ -31,9 +31,9 @@ struct nft_ct {
};
};
-static u64 nft_ct_get_eval_counter(const struct nf_conn_counter *c,
- enum nft_ct_keys k,
- enum ip_conntrack_dir d)
+static u64 __maybe_unused nft_ct_get_eval_counter(const struct nf_conn_counter *c,
+ enum nft_ct_keys k,
+ enum ip_conntrack_dir d)
{
if (d < IP_CT_DIR_MAX)
return k == NFT_CT_BYTES ? atomic64_read(&c[d].bytes) :
WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] netfilter: nft_ct: mark nft_ct_get_eval_counter __maybe_unused
Date: Wed, 13 Jan 2016 14:58:11 +0100 [thread overview]
Message-ID: <6200241.eeH6DHXzHj@wuerfel> (raw)
The newly added nft_ct_get_eval_counter() function is only used when
CONFIG_NF_CONNTRACK_LABELS is set, otherwise gcc warns about the
unused definition:
netfilter/nft_ct.c:34:12: warning: 'nft_ct_get_eval_counter' defined but not used [-Wunused-function]
static u64 nft_ct_get_eval_counter(const struct nf_conn_counter *c,
This marks the function __maybe_unused to shut up the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 48f66c905a97 ("netfilter: nft_ct: add byte/packet counter support")
---
Found on ARM randconfig builds this week
diff --git a/net/netfilter/nft_ct.c b/net/netfilter/nft_ct.c
index a0eb2161e3ef..3496929bbc54 100644
--- a/net/netfilter/nft_ct.c
+++ b/net/netfilter/nft_ct.c
@@ -31,9 +31,9 @@ struct nft_ct {
};
};
-static u64 nft_ct_get_eval_counter(const struct nf_conn_counter *c,
- enum nft_ct_keys k,
- enum ip_conntrack_dir d)
+static u64 __maybe_unused nft_ct_get_eval_counter(const struct nf_conn_counter *c,
+ enum nft_ct_keys k,
+ enum ip_conntrack_dir d)
{
if (d < IP_CT_DIR_MAX)
return k == NFT_CT_BYTES ? atomic64_read(&c[d].bytes) :
next reply other threads:[~2016-01-13 13:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-13 13:58 Arnd Bergmann [this message]
2016-01-13 13:58 ` [PATCH] netfilter: nft_ct: mark nft_ct_get_eval_counter __maybe_unused Arnd Bergmann
2016-01-13 15:54 ` Pablo Neira Ayuso
2016-01-13 15:54 ` Pablo Neira Ayuso
2016-01-13 16:49 ` Pablo Neira Ayuso
2016-01-13 16:49 ` Pablo Neira Ayuso
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=6200241.eeH6DHXzHj@wuerfel \
--to=arnd@arndb.de \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=fw@strlen.de \
--cc=kaber@trash.net \
--cc=kadlec@blackhole.kfki.hu \
--cc=linux-arm-kernel@lists.infradead.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.