Netdev List
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Florian Westphal <fw@strlen.de>
Cc: "David S. Miller" <davem@davemloft.net>,
	bhumirks@gmail.com, kernel-janitors@vger.kernel.org,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
	netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] netfilter: constify nf_conntrack_l3/4proto parameters
Date: Sat, 29 Jul 2017 22:18:38 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1707292208390.21384@hadrien> (raw)
In-Reply-To: <20170729200343.GH28392@breakpoint.cc>



On Sat, 29 Jul 2017, Florian Westphal wrote:

> Julia Lawall <Julia.Lawall@lip6.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@strlen.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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

  reply	other threads:[~2017-07-29 20:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-29 19:23 [PATCH 0/1] constify nf_conntrack_l3/4proto parameters Julia Lawall
2017-07-29 19:23 ` [PATCH 1/1] netfilter: " Julia Lawall
2017-07-29 20:03   ` Florian Westphal
2017-07-29 20:18     ` Julia Lawall [this message]
2017-07-29 21:22       ` Florian Westphal

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=alpine.DEB.2.20.1707292208390.21384@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=bhumirks@gmail.com \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=fw@strlen.de \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=kernel-janitors@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox