public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Alberto Pires de Oliveira Neto <mrpenguin2005@gmail.com>
Cc: oleg.drokin@intel.com, andreas.dilger@intel.com,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] staging: lustre: space required after that close brace '}'
Date: Sun, 08 Mar 2015 13:53:40 -0700	[thread overview]
Message-ID: <1425848020.5898.13.camel@perches.com> (raw)
In-Reply-To: <90200ddcea30fa779b41e5833514a2a66a8862ef.1425845842.git.mrpenguin2005@gmail.com>

On Sun, 2015-03-08 at 17:43 -0300, Alberto Pires de Oliveira Neto wrote:
> This patch fixes checkpatch.pl warning.
> WARNING: space required after that close brace '}'
> 
> Signed-off-by: Alberto Pires de Oliveira Neto <mrpenguin2005@gmail.com>
> ---
>  drivers/staging/lustre/lustre/fld/lproc_fld.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lustre/fld/lproc_fld.c b/drivers/staging/lustre/lustre/fld/lproc_fld.c
> index 8c5a657..3235194 100644
> --- a/drivers/staging/lustre/lustre/fld/lproc_fld.c
> +++ b/drivers/staging/lustre/lustre/fld/lproc_fld.c
> @@ -168,4 +168,4 @@ struct lprocfs_vars fld_client_proc_list[] = {
>  	{ "targets", &fld_proc_targets_fops },
>  	{ "hash", &fld_proc_hash_fops },
>  	{ "cache_flush", &fld_proc_cache_flush_fops },
> -	{ NULL }};
> +	{ NULL } };

The generally preferred form would be:

struct lprocfs_vars fld_client_proc_list[] = {
	{ "targets", &fld_proc_targets_fops },
	{ "hash", &fld_proc_hash_fops },
	{ "cache_flush", &fld_proc_cache_flush_fops },
	{ NULL }
};

though that "{ NULL }" is just more commonly "{},"

And it's probably better to remove this from the .h
file and this file and move it to the one place it's
actually used and make it static (const too eventually)

$ git grep -w fld_client_proc_list
drivers/staging/lustre/lustre/fld/fld_internal.h:extern struct lprocfs_vars fld_client_proc_list[];
drivers/staging/lustre/lustre/fld/fld_request.c:                              fld_client_proc_list, fld);
drivers/staging/lustre/lustre/fld/lproc_fld.c:struct lprocfs_vars fld_client_proc_list[] = {



  reply	other threads:[~2015-03-08 20:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-08 20:43 [PATCH 0/3] staging: lustre: Fix checkpatch.pl warnings Alberto Pires de Oliveira Neto
2015-03-08 20:43 ` [PATCH 1/3] staging: lustre: space prohibited between function name and open parenthesis '(' Alberto Pires de Oliveira Neto
2015-03-08 20:43 ` [PATCH 2/3] staging: lustre: void function return statements are not generally useful Alberto Pires de Oliveira Neto
2015-03-08 20:43 ` [PATCH 3/3] staging: lustre: space required after that close brace '}' Alberto Pires de Oliveira Neto
2015-03-08 20:53   ` Joe Perches [this message]
2015-03-08 22:04     ` Alberto Pires de Oliveira Neto
2015-03-08 22:07       ` Joe Perches
2015-03-08 22:22         ` Alberto Pires de Oliveira Neto
2015-03-08 22:59     ` Alberto Pires de Oliveira Neto

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=1425848020.5898.13.camel@perches.com \
    --to=joe@perches.com \
    --cc=andreas.dilger@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrpenguin2005@gmail.com \
    --cc=oleg.drokin@intel.com \
    /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