From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 3/7] netfilter: ctnetlink: cleanup message building and size calculation
Date: Tue, 02 Jun 2009 16:52:26 +0200 [thread overview]
Message-ID: <4A253CAA.4090906@trash.net> (raw)
In-Reply-To: <4A253BE1.9090006@netfilter.org>
Pablo Neira Ayuso wrote:
> Patrick McHardy wrote:
>> This one is really hard to review because of the mixed renames
>> and code movals. Please split this into two patches.
>
> OK, I'm splitting them now.
Thanks.
>>> +static inline const struct nf_conntrack_tuple *
>>> +nf_ct_tuple(const struct nf_conn *ct, enum ip_conntrack_dir dir)
>>> +{
>>> + return &ct->tuplehash[dir].tuple;
>>> +}
>> This is a useful helper for other situations as well, so I think
>> it shouldn't be const.
>
> I get:
>
> net/netfilter/nf_conntrack_netlink.c:370: warning: passing argument 1 of
> 'nf_ct_tuple' discards qualifiers from pointer target type
> net/netfilter/nf_conntrack_netlink.c:377: warning: passing argument 1 of
> 'nf_ct_tuple' discards qualifiers from pointer target type
>
> So I have to remove the 'const' from the last parameter of
> ctnetlink_fill_info().
>
> Or do some ugly casting in the nf_ct_tuple() calls to avoid the warning,
> in that case I would prefer to leave that macro there.
>
> Please, let me know what you prefer.
The best way is probably to keep using a macro since there's
no other way to handle this properly. But I'm all in favour
of renaming that macro and making it globally available as
you did.
next prev parent reply other threads:[~2009-06-02 14:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-02 11:51 [PATCH 0/7] Netfilter updates for nf-next tree (2.6.31) Pablo Neira Ayuso
2009-06-02 11:51 ` [PATCH 1/7] netfilter: nfnetlink: cleanup for nfnetlink_rcv_msg() function Pablo Neira Ayuso
2009-06-02 11:52 ` [PATCH 2/7] netfilter: ctnetlink: remove nowait parameter from *fill_info() Pablo Neira Ayuso
2009-06-02 11:52 ` [PATCH 3/7] netfilter: ctnetlink: cleanup message building and size calculation Pablo Neira Ayuso
2009-06-02 13:11 ` Patrick McHardy
2009-06-02 14:49 ` Pablo Neira Ayuso
2009-06-02 14:52 ` Patrick McHardy [this message]
2009-06-02 11:52 ` [PATCH 4/7] netfilter: conntrack: don't report events on module removal Pablo Neira Ayuso
2009-06-02 11:53 ` [PATCH 5/7] netfilter: conntrack: remove events flags from userspace exposed file Pablo Neira Ayuso
2009-06-02 11:53 ` [PATCH 6/7] netfilter: conntrack: simplify event caching system Pablo Neira Ayuso
2009-06-02 11:54 ` [PATCH 7/7] netfilter: conntrack: replace notify chain by function pointer Pablo Neira Ayuso
2009-06-02 12:54 ` [PATCH 0/7] Netfilter updates for nf-next tree (2.6.31) Patrick McHardy
2009-06-02 14:43 ` Pablo Neira Ayuso
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=4A253CAA.4090906@trash.net \
--to=kaber@trash.net \
--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;
as well as URLs for NNTP newsgroup(s).