Re: [PATCH 0/2] constify nf_hook_ops structures

2017-07-29 Thread Julia Lawall
On Sat, 29 Jul 2017, Florian Westphal wrote: > Julia Lawall wrote: > > On Sat, 29 Jul 2017, Florian Westphal wrote: > > > From a quick glance I don't see why we can't e.g. constify > > > nf_conntrack_l3/4_proto too. It is not going to be as simple > > > as just placing const everywhere, but I s

Re: [PATCH 0/2] constify nf_hook_ops structures

2017-07-29 Thread Florian Westphal
Julia Lawall wrote: > On Sat, 29 Jul 2017, Florian Westphal wrote: > > From a quick glance I don't see why we can't e.g. constify > > nf_conntrack_l3/4_proto too. It is not going to be as simple > > as just placing const everywhere, but I see no requirement for > > having these writeable. > > I w

Re: [PATCH 0/2] constify nf_hook_ops structures

2017-07-29 Thread Julia Lawall
On Sat, 29 Jul 2017, Florian Westphal wrote: > Julia Lawall wrote: > > > > > > On Sat, 29 Jul 2017, Florian Westphal wrote: > > > > > Julia Lawall wrote: > > > > The nf_hook_ops structure is only passed as the second argument to > > > > nf_register_net_hook or nf_unregister_net_hook, both of w

Re: [PATCH 0/2] constify nf_hook_ops structures

2017-07-29 Thread Florian Westphal
Julia Lawall wrote: > > > On Sat, 29 Jul 2017, Florian Westphal wrote: > > > Julia Lawall wrote: > > > The nf_hook_ops structure is only passed as the second argument to > > > nf_register_net_hook or nf_unregister_net_hook, both of which are > > > declared as const. Thus the nf_hook_ops struc

Re: [PATCH 0/2] constify nf_hook_ops structures

2017-07-29 Thread Julia Lawall
On Sat, 29 Jul 2017, Florian Westphal wrote: > Julia Lawall wrote: > > The nf_hook_ops structure is only passed as the second argument to > > nf_register_net_hook or nf_unregister_net_hook, both of which are > > declared as const. Thus the nf_hook_ops structure itself can be > > const. > > Rig

Re: [PATCH 0/2] constify nf_hook_ops structures

2017-07-29 Thread Florian Westphal
Julia Lawall wrote: > The nf_hook_ops structure is only passed as the second argument to > nf_register_net_hook or nf_unregister_net_hook, both of which are > declared as const. Thus the nf_hook_ops structure itself can be > const. Right, also see http://patchwork.ozlabs.org/patch/793767/ This

[PATCH 0/2] constify nf_hook_ops structures

2017-07-29 Thread Julia Lawall
The nf_hook_ops structure is only passed as the second argument to nf_register_net_hook or nf_unregister_net_hook, both of which are declared as const. Thus the nf_hook_ops structure itself can be const. Done with the help of Coccinelle. --- net/decnet/netfilter/dn_rtmsg.c|2 +- net/ip