[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1707292208390.21384@hadrien>
Date: Sat, 29 Jul 2017 22:18:38 +0200 (CEST)
From: Julia Lawall <julia.lawall@...6.fr>
To: Florian Westphal <fw@...len.de>
cc: "David S. Miller" <davem@...emloft.net>, bhumirks@...il.com,
kernel-janitors@...r.kernel.org,
Pablo Neira Ayuso <pablo@...filter.org>,
Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] netfilter: constify nf_conntrack_l3/4proto
parameters
On Sat, 29 Jul 2017, Florian Westphal wrote:
> Julia Lawall <Julia.Lawall@...6.fr> wrote:
> > When a nf_conntrack_l3/4proto parameter is not on the left hand side
> > of an assignment, its address is not taken, and it is not passed to a
> > function that may modify its fields, then it can be declared as const.
> >
> > This change is useful from a documentation point of view, and can
> > possibly facilitate making some nf_conntrack_l3/4proto structures const
> > subsequently.
> >
> > Done with the help of Coccinelle.
> >
> > Some spacing adjusted to fit within 80 characters.
>
> Acked-by: Florian Westphal <fw@...len.de>
>
> Thanks Julia.
>
> I think we can indeed constify these completely after making
> 'nla_size' set at compile time.
>
> I'll send a simple attempt to make it so for l3proto soon.
There is another issue with respect to nf_ct_l3proto_unregister. This
calls nf_ct_iterate_destroy with l3proto as the second argument. This
function has signature:
void
nf_ct_iterate_destroy(int (*iter)(struct nf_conn *i, void *data), void *data)
The void * is not const. Maybe it could be.
julia
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Powered by blists - more mailing lists