From: Eric Dumazet <dada1@cosmosbay.com>
To: Joe Perches <joe@perches.com>
Cc: David Miller <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [XFRM]: constify 'struct xfrm_type'
Date: Thu, 24 Jan 2008 20:24:17 +0100 [thread overview]
Message-ID: <4798E5E1.9050408@cosmosbay.com> (raw)
In-Reply-To: <1201199858.16268.46.camel@localhost>
Joe Perches a écrit :
> On Thu, 2008-01-24 at 19:23 +0100, Eric Dumazet wrote:
>> Having const data is nice because moving them from .data to .rodata,
>> but what would be practical gains to use a const pointer ???
>
> const data is good, using pointers to const data is good.
Yes, this is what is done.
> using const pointers to const data is good.
const pointers are seldom used in linux kernel, because mostly useless.
> using const pointers to data not specified as const is not so good.
You misread the patch. I am not using const pointers at all, but const data.
>
> Here's what you are doing now.
>
> +static void xfrm_put_type(const struct xfrm_type *type)
> [...]
> + const struct xfrm_type *type;
>
Yes, this was the plan, I meant it.
I still dont understand what *you* want to do.
Doing :
int xfrm_unregister_type(const struct xfrm_type * const type, const unsigned
short family)
instead of :
int xfrm_unregister_type(const struct xfrm_type *type, unsigned short family)
buys nothing for the caller.
next prev parent reply other threads:[~2008-01-24 19:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-24 11:26 [XFRM]: constify 'struct xfrm_type' Eric Dumazet
2008-01-24 17:17 ` Joe Perches
2008-01-24 18:23 ` Eric Dumazet
2008-01-24 18:37 ` Joe Perches
2008-01-24 19:24 ` Eric Dumazet [this message]
2008-01-24 19:37 ` Joe Perches
2008-01-31 3:12 ` David Miller
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=4798E5E1.9050408@cosmosbay.com \
--to=dada1@cosmosbay.com \
--cc=davem@davemloft.net \
--cc=joe@perches.com \
--cc=netdev@vger.kernel.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 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.