From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Subject: Re: [PATCH] net: make ctl_path local and const Date: Tue, 19 Oct 2010 20:28:57 -0700 Message-ID: <1287545337.10409.602.camel@Joe-Laptop> References: <1287543276-4511-1-git-send-email-xiaosuo@gmail.com> <1287543701.10409.599.camel@Joe-Laptop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: bridge-bounces@lists.linux-foundation.org Errors-To: bridge-bounces@lists.linux-foundation.org To: Changli Gao Cc: Andy Grover , James Morris , linux-sctp@vger.kernel.org, rds-devel@oss.oracle.com, "Pekka Savola (ipv6)" , 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 , Alexey Kuznetsov , Joerg Reuter , Sridhar Samudrala , Samuel Ortiz , Vlad Yasevich , netfilter@vger.kernel.org, Remi Denis-Courmont , linux-hams@vger.kernel.org, Hideaki YOSHIFUJI , netdev@vger.kernel.org, linux-decnet-user@lists.sourceforge.net, linux-kernel@vger.ker On Wed, 2010-10-20 at 11:10 +0800, Changli Gao wrote: > On Wed, Oct 20, 2010 at 11:01 AM, Joe Perches wrote: > > On Wed, 2010-10-20 at 10:54 +0800, Changli Gao wrote: > >> Signed-off-by: Changli Gao > > [] > >> 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