netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Changli Gao <xiaosuo@gmail.com>
Cc: Andy Grover <andy.grover@oracle.com>,
	James Morris <jmorris@namei.org>,
	linux-sctp@vger.kernel.org, rds-devel@oss.oracle.com,
	"Pekka Savola \(ipv6\)" <pekkas@netcore.fi>,
	linux-x25@vger.kernel.org, dccp@vger.kernel.org,
	bridge@lists.linux-foundation.org,
	Andrew@smtp1.linux-foundation.org, coreteam@netfilter.org,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	Joerg Reuter <jreuter@yaina.de>,
	Sridhar Samudrala <sri@us.ibm.com>,
	Samuel Ortiz <samuel@sortiz.org>,
	Vlad Yasevich <vladislav.yasevich@hp.com>,
	netfilter@vger.kernel.org,
	Remi Denis-Courmont <remi.denis-courmont@nokia.com>,
	linux-hams@vger.kernel.org,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	netdev@vger.kernel.org, linux-decnet-user@lists.sourceforge.net,
	linux-kernel@vger.ker
Subject: Re: [PATCH] net: make ctl_path local and const
Date: Tue, 19 Oct 2010 20:28:57 -0700	[thread overview]
Message-ID: <1287545337.10409.602.camel@Joe-Laptop> (raw)
In-Reply-To: <AANLkTi=pz4zYnnUSvb9FjVvCAURruHhJTz7pBKDi8Pdw@mail.gmail.com>

On Wed, 2010-10-20 at 11:10 +0800, Changli Gao wrote:
> On Wed, Oct 20, 2010 at 11:01 AM, Joe Perches <joe@perches.com> wrote:
> > On Wed, 2010-10-20 at 10:54 +0800, Changli Gao wrote:
> >> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
> > []
> >> diff --git a/net/appletalk/sysctl_net_atalk.c b/net/appletalk/sysctl_net_atalk.c
> >> index 04e9c0d..b92f269 100644
> >> --- a/net/appletalk/sysctl_net_atalk.c
> >> +++ b/net/appletalk/sysctl_net_atalk.c
> >> @@ -42,16 +42,16 @@ static struct ctl_table atalk_table[] = {
> >>       { },
> >>  };
> >> -static struct ctl_path atalk_path[] = {
> >> -     { .procname = "net", },
> >> -     { .procname = "appletalk", },
> >> -     { }
> >> -};
> >> -
> >>  static struct ctl_table_header *atalk_table_header;
> >>
> >>  void atalk_register_sysctl(void)
> >>  {
> >> +     const struct ctl_path atalk_path[] = {
> > Shouldn't all of these be static const struct ?
> They needn't. And some variables are specified __net_initdata currently.

At least some objects are smaller with static.

$ size net/appletalk/sysctl_net_atalk.o.*
   text	   data	    bss	    dec	    hex	filename
    324	    236	     48	    608	    260	net/appletalk/sysctl_net_atalk.o.withstatic
    344	    236	     48	    628	    274	net/appletalk/sysctl_net_atalk.o.withoutstatic

  reply	other threads:[~2010-10-20  3:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-20  2:54 [PATCH] net: make ctl_path local and const Changli Gao
2010-10-20  3:01 ` Joe Perches
2010-10-20  3:10   ` Changli Gao
2010-10-20  3:28     ` Joe Perches [this message]
2010-10-20  4:52       ` Changli Gao
2010-10-20  4:59         ` Joe Perches
2010-10-20  5:10           ` Changli Gao

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=1287545337.10409.602.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=Andrew@smtp1.linux-foundation.org \
    --cc=acme@ghostprotocols.net \
    --cc=andy.grover@oracle.com \
    --cc=bridge@lists.linux-foundation.org \
    --cc=coreteam@netfilter.org \
    --cc=dccp@vger.kernel.org \
    --cc=jmorris@namei.org \
    --cc=jreuter@yaina.de \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-decnet-user@lists.sourceforge.net \
    --cc=linux-hams@vger.kernel.org \
    --cc=linux-kernel@vger.ker \
    --cc=linux-sctp@vger.kernel.org \
    --cc=linux-x25@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter@vger.kernel.org \
    --cc=pekkas@netcore.fi \
    --cc=rds-devel@oss.oracle.com \
    --cc=remi.denis-courmont@nokia.com \
    --cc=samuel@sortiz.org \
    --cc=sri@us.ibm.com \
    --cc=vladislav.yasevich@hp.com \
    --cc=xiaosuo@gmail.com \
    --cc=yoshfuji@linux-ipv6.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).