public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta•com>
To: Changli Gao <xiaosuo@gmail•com>
Cc: "David S. Miller" <davem@davemloft•net>, netdev@vger•kernel.org
Subject: Re: [PATCH] net: unix: make some variables constant
Date: Mon, 18 Oct 2010 23:03:22 -0700	[thread overview]
Message-ID: <20101018230322.490ac710@nehalam> (raw)
In-Reply-To: <1287465842-2958-1-git-send-email-xiaosuo@gmail.com>

On Tue, 19 Oct 2010 13:24:02 +0800
Changli Gao <xiaosuo@gmail•com> wrote:

> And since ctl_table.data is initialized later, we don't need to initialize
> the data member of the template variable unix_table.
> 
> Signed-off-by: Changli Gao <xiaosuo@gmail•com>
> ---
>  net/unix/sysctl_net_unix.c |    5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> diff --git a/net/unix/sysctl_net_unix.c b/net/unix/sysctl_net_unix.c
> index 397cffe..1114ccc 100644
> --- a/net/unix/sysctl_net_unix.c
> +++ b/net/unix/sysctl_net_unix.c
> @@ -15,10 +15,9 @@
>  
>  #include <net/af_unix.h>
>  
> -static ctl_table unix_table[] = {
> +const static ctl_table unix_table[] = {

Typical convention is "static const" rather than "const static"

git grep 'const static' | wc -l  => 5
git grep 'static const' | wc -l  => 18589

-- 

      parent reply	other threads:[~2010-10-19  6:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-19  5:24 [PATCH] net: unix: make some variables constant Changli Gao
2010-10-19  5:47 ` Eric Dumazet
2010-10-19  6:03   ` Changli Gao
2010-10-19  6:03 ` Stephen Hemminger [this message]

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=20101018230322.490ac710@nehalam \
    --to=shemminger@vyatta$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=xiaosuo@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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