* [PATCH] [net-next] netfilter: add ifdef around ctnetlink_proto_size
@ 2017-11-07 14:11 Arnd Bergmann
2017-11-13 12:43 ` Pablo Neira Ayuso
0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2017-11-07 14:11 UTC (permalink / raw)
To: Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal, David S. Miller
Cc: Arnd Bergmann, Liping Zhang, netfilter-devel, coreteam, netdev,
linux-kernel
This function is no longer marked 'inline', so we now get a warning
when it is unused:
net/netfilter/nf_conntrack_netlink.c:536:15: error: 'ctnetlink_proto_size' defined but not used [-Werror=unused-function]
We could mark it inline again, mark it __maybe_unused, or add an #ifdef
around the definition. I'm picking the third approach here since that
seems to be what the rest of the file has.
Fixes: 5caaed151a68 ("netfilter: conntrack: don't cache nlattr_tuple_size result in nla_size")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
net/netfilter/nf_conntrack_netlink.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 6e0adfefb9ed..59c08997bfdf 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -533,6 +533,7 @@ ctnetlink_fill_info(struct sk_buff *skb, u32 portid, u32 seq, u32 type,
return -1;
}
+#if defined(CONFIG_NETFILTER_NETLINK_GLUE_CT) || defined(CONFIG_NF_CONNTRACK_EVENTS)
static size_t ctnetlink_proto_size(const struct nf_conn *ct)
{
const struct nf_conntrack_l3proto *l3proto;
@@ -552,6 +553,7 @@ static size_t ctnetlink_proto_size(const struct nf_conn *ct)
return len + len4;
}
+#endif
static inline size_t ctnetlink_acct_size(const struct nf_conn *ct)
{
--
2.9.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] [net-next] netfilter: add ifdef around ctnetlink_proto_size
2017-11-07 14:11 [PATCH] [net-next] netfilter: add ifdef around ctnetlink_proto_size Arnd Bergmann
@ 2017-11-13 12:43 ` Pablo Neira Ayuso
0 siblings, 0 replies; 4+ messages in thread
From: Pablo Neira Ayuso @ 2017-11-13 12:43 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Jozsef Kadlecsik, Florian Westphal, David S. Miller,
Liping Zhang, netfilter-devel, coreteam, netdev, linux-kernel
On Tue, Nov 07, 2017 at 03:11:51PM +0100, Arnd Bergmann wrote:
> This function is no longer marked 'inline', so we now get a warning
> when it is unused:
>
> net/netfilter/nf_conntrack_netlink.c:536:15: error: 'ctnetlink_proto_size' defined but not used [-Werror=unused-function]
>
> We could mark it inline again, mark it __maybe_unused, or add an #ifdef
> around the definition. I'm picking the third approach here since that
> seems to be what the rest of the file has.
Applied, thanks Arnd.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next] netfilter: add ifdef around ctnetlink_proto_size
2017-11-15 17:28 [PATCH net-next] " Pablo Neira Ayuso
@ 2017-11-16 1:50 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-11-16 1:50 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel, netdev, arnd
From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: Wed, 15 Nov 2017 18:28:21 +0100
> From: Arnd Bergmann <arnd@arndb.de>
>
> This function is no longer marked 'inline', so we now get a warning
> when it is unused:
>
> net/netfilter/nf_conntrack_netlink.c:536:15: error: 'ctnetlink_proto_size' defined but not used [-Werror=unused-function]
>
> We could mark it inline again, mark it __maybe_unused, or add an #ifdef
> around the definition. I'm picking the third approach here since that
> seems to be what the rest of the file has.
>
> Fixes: 5caaed151a68 ("netfilter: conntrack: don't cache nlattr_tuple_size result in nla_size")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net-next] netfilter: add ifdef around ctnetlink_proto_size
@ 2017-11-15 17:28 Pablo Neira Ayuso
2017-11-16 1:50 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Pablo Neira Ayuso @ 2017-11-15 17:28 UTC (permalink / raw)
To: davem; +Cc: netfilter-devel, netdev, arnd
From: Arnd Bergmann <arnd@arndb.de>
This function is no longer marked 'inline', so we now get a warning
when it is unused:
net/netfilter/nf_conntrack_netlink.c:536:15: error: 'ctnetlink_proto_size' defined but not used [-Werror=unused-function]
We could mark it inline again, mark it __maybe_unused, or add an #ifdef
around the definition. I'm picking the third approach here since that
seems to be what the rest of the file has.
Fixes: 5caaed151a68 ("netfilter: conntrack: don't cache nlattr_tuple_size result in nla_size")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
@David: please place this fix into your net-next tree, it is calming
down a compilation warning. Thanks!
net/netfilter/nf_conntrack_netlink.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 71a43ed19a0f..96277706b379 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -533,6 +533,7 @@ ctnetlink_fill_info(struct sk_buff *skb, u32 portid, u32 seq, u32 type,
return -1;
}
+#if defined(CONFIG_NETFILTER_NETLINK_GLUE_CT) || defined(CONFIG_NF_CONNTRACK_EVENTS)
static size_t ctnetlink_proto_size(const struct nf_conn *ct)
{
const struct nf_conntrack_l3proto *l3proto;
@@ -552,6 +553,7 @@ static size_t ctnetlink_proto_size(const struct nf_conn *ct)
return len + len4;
}
+#endif
static inline size_t ctnetlink_acct_size(const struct nf_conn *ct)
{
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-16 1:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-07 14:11 [PATCH] [net-next] netfilter: add ifdef around ctnetlink_proto_size Arnd Bergmann
2017-11-13 12:43 ` Pablo Neira Ayuso
2017-11-15 17:28 [PATCH net-next] " Pablo Neira Ayuso
2017-11-16 1:50 ` David Miller
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.