Re: [PATCH] net: make ctl_path local and const

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2010-10-20 at 11:10 +0800, Changli Gao wrote:
> On Wed, Oct 20, 2010 at 11:01 AM, Joe Perches <joe@xxxxxxxxxxx> wrote:
> > On Wed, 2010-10-20 at 10:54 +0800, Changli Gao wrote:
> >> Signed-off-by: Changli Gao <xiaosuo@xxxxxxxxx>
> > []
> >> 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



_______________________________________________
Bridge mailing list
Bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/bridge


[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux