All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] staging: lustre: Fix checkpatch.pl warnings.
@ 2015-03-08 20:43 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
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Alberto Pires de Oliveira Neto @ 2015-03-08 20:43 UTC (permalink / raw)
  To: oleg.drokin, andreas.dilger, gregkh
  Cc: linux-kernel, Alberto Pires de Oliveira Neto

Alberto Pires de Oliveira Neto (3):
  staging: lustre: space prohibited between function name and open parenthesis '('
  staging: lustre: void function return statements are not generally useful.
  staging: lustre: space required after that close brace '}'

 drivers/staging/lustre/lustre/fld/fld_internal.h | 2 +-
 drivers/staging/lustre/lustre/fld/fld_request.c  | 1 -
 drivers/staging/lustre/lustre/fld/lproc_fld.c    | 2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)

-- 
1.9.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/3] staging: lustre: space prohibited between function name and open parenthesis '('
  2015-03-08 20:43 [PATCH 0/3] staging: lustre: Fix checkpatch.pl warnings Alberto Pires de Oliveira Neto
@ 2015-03-08 20:43 ` 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
  2 siblings, 0 replies; 9+ messages in thread
From: Alberto Pires de Oliveira Neto @ 2015-03-08 20:43 UTC (permalink / raw)
  To: oleg.drokin, andreas.dilger, gregkh
  Cc: linux-kernel, Alberto Pires de Oliveira Neto

This patch fixes checkpatch.pl warning.
WARNING: space prohibited between function name and open parenthesis '('

Signed-off-by: Alberto Pires de Oliveira Neto <mrpenguin2005@gmail.com>
---
 drivers/staging/lustre/lustre/fld/fld_internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/fld/fld_internal.h b/drivers/staging/lustre/lustre/fld/fld_internal.h
index 6125bbe..68bec765 100644
--- a/drivers/staging/lustre/lustre/fld/fld_internal.h
+++ b/drivers/staging/lustre/lustre/fld/fld_internal.h
@@ -142,7 +142,7 @@ extern struct lu_fld_hash fld_hash[];
 int fld_client_rpc(struct obd_export *exp,
 		   struct lu_seq_range *range, __u32 fld_op);
 
-#if defined (CONFIG_PROC_FS)
+#if defined(CONFIG_PROC_FS)
 extern struct lprocfs_vars fld_client_proc_list[];
 #endif
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] staging: lustre: void function return statements are not generally useful.
  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 ` 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
  2 siblings, 0 replies; 9+ messages in thread
From: Alberto Pires de Oliveira Neto @ 2015-03-08 20:43 UTC (permalink / raw)
  To: oleg.drokin, andreas.dilger, gregkh
  Cc: linux-kernel, Alberto Pires de Oliveira Neto

This patch fixes checkpatch.pl warning.
WARNING: void function return statements are not generally useful

Signed-off-by: Alberto Pires de Oliveira Neto <mrpenguin2005@gmail.com>
---
 drivers/staging/lustre/lustre/fld/fld_request.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c b/drivers/staging/lustre/lustre/fld/fld_request.c
index 22e0d94..6ac225e 100644
--- a/drivers/staging/lustre/lustre/fld/fld_request.c
+++ b/drivers/staging/lustre/lustre/fld/fld_request.c
@@ -326,7 +326,6 @@ static int fld_client_proc_init(struct lu_client_fld *fld)
 
 void fld_client_proc_fini(struct lu_client_fld *fld)
 {
-	return;
 }
 #endif
 EXPORT_SYMBOL(fld_client_proc_fini);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] staging: lustre: space required after that close brace '}'
  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 ` Alberto Pires de Oliveira Neto
  2015-03-08 20:53   ` Joe Perches
  2 siblings, 1 reply; 9+ messages in thread
From: Alberto Pires de Oliveira Neto @ 2015-03-08 20:43 UTC (permalink / raw)
  To: oleg.drokin, andreas.dilger, gregkh
  Cc: linux-kernel, Alberto Pires de Oliveira Neto

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 } };
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] staging: lustre: space required after that close brace '}'
  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
  2015-03-08 22:04     ` Alberto Pires de Oliveira Neto
  2015-03-08 22:59     ` Alberto Pires de Oliveira Neto
  0 siblings, 2 replies; 9+ messages in thread
From: Joe Perches @ 2015-03-08 20:53 UTC (permalink / raw)
  To: Alberto Pires de Oliveira Neto
  Cc: oleg.drokin, andreas.dilger, gregkh, linux-kernel

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[] = {



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] staging: lustre: space required after that close brace '}'
  2015-03-08 20:53   ` Joe Perches
@ 2015-03-08 22:04     ` Alberto Pires de Oliveira Neto
  2015-03-08 22:07       ` Joe Perches
  2015-03-08 22:59     ` Alberto Pires de Oliveira Neto
  1 sibling, 1 reply; 9+ messages in thread
From: Alberto Pires de Oliveira Neto @ 2015-03-08 22:04 UTC (permalink / raw)
  To: Joe Perches; +Cc: oleg.drokin, andreas.dilger, Greg KH, linux-kernel

It make sense. But I would also have move some dependencies as well.
As I'm still very new to the kernel, and on my first patches, I
believe it's safer to stick to the clean up.
So I'll leave the moving of the structure up to the maintainers if it's ok.


On Sun, Mar 8, 2015 at 5:53 PM, Joe Perches <joe@perches.com> wrote:
> 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[] = {
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] staging: lustre: space required after that close brace '}'
  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
  0 siblings, 1 reply; 9+ messages in thread
From: Joe Perches @ 2015-03-08 22:07 UTC (permalink / raw)
  To: Alberto Pires de Oliveira Neto
  Cc: oleg.drokin, andreas.dilger, Greg KH, linux-kernel

On Sun, 2015-03-08 at 19:04 -0300, Alberto Pires de Oliveira Neto wrote:
> It make sense. But I would also have move some dependencies as well.
> As I'm still very new to the kernel, and on my first patches, I
> believe it's safer to stick to the clean up.
> So I'll leave the moving of the structure up to the maintainers if it's ok.

Don't be afraid of making sensible changes.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] staging: lustre: space required after that close brace '}'
  2015-03-08 22:07       ` Joe Perches
@ 2015-03-08 22:22         ` Alberto Pires de Oliveira Neto
  0 siblings, 0 replies; 9+ messages in thread
From: Alberto Pires de Oliveira Neto @ 2015-03-08 22:22 UTC (permalink / raw)
  To: Joe Perches; +Cc: oleg.drokin, andreas.dilger, Greg KH, linux-kernel

ok, I'll give it a try.

On Sun, Mar 8, 2015 at 7:07 PM, Joe Perches <joe@perches.com> wrote:
> On Sun, 2015-03-08 at 19:04 -0300, Alberto Pires de Oliveira Neto wrote:
>> It make sense. But I would also have move some dependencies as well.
>> As I'm still very new to the kernel, and on my first patches, I
>> believe it's safer to stick to the clean up.
>> So I'll leave the moving of the structure up to the maintainers if it's ok.
>
> Don't be afraid of making sensible changes.
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] staging: lustre: space required after that close brace '}'
  2015-03-08 20:53   ` Joe Perches
  2015-03-08 22:04     ` Alberto Pires de Oliveira Neto
@ 2015-03-08 22:59     ` Alberto Pires de Oliveira Neto
  1 sibling, 0 replies; 9+ messages in thread
From: Alberto Pires de Oliveira Neto @ 2015-03-08 22:59 UTC (permalink / raw)
  To: Joe Perches; +Cc: oleg.drokin, andreas.dilger, Greg KH, linux-kernel

it seems that I would have to move all file operations specific to
proc_fs from lproc_fld to fld_request.
Although the proc_fs seems to be used only from fld_request, it still
seems cleaner to keep them separated than put it all together.






On Sun, Mar 8, 2015 at 5:53 PM, Joe Perches <joe@perches.com> wrote:
> 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[] = {
>
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-03-08 22:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.