* [PATCH][netfilter-next] netfilter: conntrack: make struct nf_conntrack_l4proto_gre4 static
@ 2017-12-10 23:32 Colin King
2017-12-11 9:18 ` Florian Westphal
0 siblings, 1 reply; 5+ messages in thread
From: Colin King @ 2017-12-10 23:32 UTC (permalink / raw)
To: Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
David S . Miller, netfilter-devel, coreteam, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The structure nf_conntrack_l4proto_gre4 is local to the source and does
not need to be in global scope, so make it static.
Cleans up sparse warning:
symbol 'nf_conntrack_l4proto_gre4' was not declared. Should it be static?
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
net/netfilter/nf_conntrack_proto_gre.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/nf_conntrack_proto_gre.c b/net/netfilter/nf_conntrack_proto_gre.c
index 6d8d1276cf3a..86c346ea1dd5 100644
--- a/net/netfilter/nf_conntrack_proto_gre.c
+++ b/net/netfilter/nf_conntrack_proto_gre.c
@@ -352,7 +352,7 @@ static int gre_init_net(struct net *net, u_int16_t proto)
}
/* protocol helper struct */
-struct nf_conntrack_l4proto nf_conntrack_l4proto_gre4 = {
+static struct nf_conntrack_l4proto nf_conntrack_l4proto_gre4 = {
.l3proto = AF_INET,
.l4proto = IPPROTO_GRE,
.pkt_to_tuple = gre_pkt_to_tuple,
--
2.14.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH][netfilter-next] netfilter: conntrack: make struct nf_conntrack_l4proto_gre4 static
2017-12-10 23:32 [PATCH][netfilter-next] netfilter: conntrack: make struct nf_conntrack_l4proto_gre4 static Colin King
@ 2017-12-11 9:18 ` Florian Westphal
0 siblings, 0 replies; 5+ messages in thread
From: Florian Westphal @ 2017-12-11 9:18 UTC (permalink / raw)
To: Colin King
Cc: Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
David S . Miller, netfilter-devel, coreteam, netdev,
kernel-janitors, linux-kernel
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The structure nf_conntrack_l4proto_gre4 is local to the source and does
> not need to be in global scope, so make it static.
This bug was added in
commit b9679a9fd3a7d36ea3deb2864a00cc413c5aae28
netfilter: conntrack: l4 protocol trackers can be const
> -struct nf_conntrack_l4proto nf_conntrack_l4proto_gre4 = {
> +static struct nf_conntrack_l4proto nf_conntrack_l4proto_gre4 = {
This should be 'static const'.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][netfilter-next] netfilter: conntrack: make struct nf_conntrack_l4proto_gre4 static
@ 2017-12-11 9:18 ` Florian Westphal
0 siblings, 0 replies; 5+ messages in thread
From: Florian Westphal @ 2017-12-11 9:18 UTC (permalink / raw)
To: Colin King
Cc: Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
David S . Miller, netfilter-devel, coreteam, netdev,
kernel-janitors, linux-kernel
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The structure nf_conntrack_l4proto_gre4 is local to the source and does
> not need to be in global scope, so make it static.
This bug was added in
commit b9679a9fd3a7d36ea3deb2864a00cc413c5aae28
netfilter: conntrack: l4 protocol trackers can be const
> -struct nf_conntrack_l4proto nf_conntrack_l4proto_gre4 = {
> +static struct nf_conntrack_l4proto nf_conntrack_l4proto_gre4 = {
This should be 'static const'.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][netfilter-next] netfilter: conntrack: make struct nf_conntrack_l4proto_gre4 static
2017-12-11 9:18 ` Florian Westphal
@ 2017-12-18 10:59 ` Pablo Neira Ayuso
-1 siblings, 0 replies; 5+ messages in thread
From: Pablo Neira Ayuso @ 2017-12-18 10:59 UTC (permalink / raw)
To: Florian Westphal
Cc: Colin King, Jozsef Kadlecsik, David S . Miller, netfilter-devel,
coreteam, netdev, kernel-janitors, linux-kernel
On Mon, Dec 11, 2017 at 10:18:05AM +0100, Florian Westphal wrote:
> Colin King <colin.king@canonical.com> wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > The structure nf_conntrack_l4proto_gre4 is local to the source and does
> > not need to be in global scope, so make it static.
>
> This bug was added in
> commit b9679a9fd3a7d36ea3deb2864a00cc413c5aae28
> netfilter: conntrack: l4 protocol trackers can be const
I have added Fixes: ... here.
> > -struct nf_conntrack_l4proto nf_conntrack_l4proto_gre4 = {
> > +static struct nf_conntrack_l4proto nf_conntrack_l4proto_gre4 = {
>
> This should be 'static const'.
I have mangled this patch to make it static const.
So Colin doesn't need to resend.
If there's anything else, let me know, I'll toss it and wait for a v2,
as you prefer.
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][netfilter-next] netfilter: conntrack: make struct nf_conntrack_l4proto_gre4 static
@ 2017-12-18 10:59 ` Pablo Neira Ayuso
0 siblings, 0 replies; 5+ messages in thread
From: Pablo Neira Ayuso @ 2017-12-18 10:59 UTC (permalink / raw)
To: Florian Westphal
Cc: Colin King, Jozsef Kadlecsik, David S . Miller, netfilter-devel,
coreteam, netdev, kernel-janitors, linux-kernel
On Mon, Dec 11, 2017 at 10:18:05AM +0100, Florian Westphal wrote:
> Colin King <colin.king@canonical.com> wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> >
> > The structure nf_conntrack_l4proto_gre4 is local to the source and does
> > not need to be in global scope, so make it static.
>
> This bug was added in
> commit b9679a9fd3a7d36ea3deb2864a00cc413c5aae28
> netfilter: conntrack: l4 protocol trackers can be const
I have added Fixes: ... here.
> > -struct nf_conntrack_l4proto nf_conntrack_l4proto_gre4 = {
> > +static struct nf_conntrack_l4proto nf_conntrack_l4proto_gre4 = {
>
> This should be 'static const'.
I have mangled this patch to make it static const.
So Colin doesn't need to resend.
If there's anything else, let me know, I'll toss it and wait for a v2,
as you prefer.
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-18 10:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-10 23:32 [PATCH][netfilter-next] netfilter: conntrack: make struct nf_conntrack_l4proto_gre4 static Colin King
2017-12-11 9:18 ` Florian Westphal
2017-12-11 9:18 ` Florian Westphal
2017-12-18 10:59 ` Pablo Neira Ayuso
2017-12-18 10:59 ` Pablo Neira Ayuso
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.