staging: lustre: Fix multiple checkpatch warnings
cover staging: lustre: Fix multiple checkpatch warnings
Fixes multiple checkpatch.pl warnings in lustre.
Rehas Sachdeva (6):
staging: lustre: Add space b/w concatenated strings
staging: lustre: Fix block comment style
staging: lustre: Change 'unsigned' to 'unsigned int'
staging: lustre: Change 'seq_printf' to 'seq_puts'
staging: lustre: Remove unnecessary 'return'
staging: lustre: Fix indentation
drivers/staging/lustre/lustre/fid/fid_request.c | 8 ++++---- drivers/staging/lustre/lustre/fid/lproc_fid.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 6 ++++-- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 8 ++++---- drivers/staging/lustre/lustre/llite/file.c | 2 +- drivers/staging/lustre/lustre/llite/lproc_llite.c | 2 +- drivers/staging/lustre/lustre/llite/rw.c | 4 +--- 7 files changed, 16 insertions(+), 16 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/6 staging: lustre: Add space b/w concatenated strings
Fixes checkpatch.pl warning:
CHECK: Concatenated strings should use spaces between elements
--- drivers/staging/lustre/lustre/fid/fid_request.c | 8 ++++---- drivers/staging/lustre/lustre/fid/lproc_fid.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/lustre/lustre/fid/fid_request.c +4 -4
@@ -125,19 +125,19 @@ static int seq_client_rpc(struct lu_client_seq *seq,if (!range_is_sane (output)) {CERROR ("%s: Invalid range received from server: " -DRANGE "\n" , seq->lcs_name,PRANGE (output)); +DRANGE "\n" , seq->lcs_name,PRANGE (output)); rc = -EINVAL ; goto out_req; }if (range_is_exhausted (output)) {CERROR ("%s: Range received from server is exhausted: " -DRANGE "]\n" , seq->lcs_name,PRANGE (output)); +DRANGE "]\n" , seq->lcs_name,PRANGE (output)); rc = -EINVAL ; goto out_req; } -CDEBUG_LIMIT (debug_mask,"%s: Allocated %s-sequence " DRANGE "]\n" , +CDEBUG_LIMIT (debug_mask,"%s: Allocated %s-sequence " DRANGE "]\n" , seq->lcs_name, opcname,PRANGE (output)); out_req:
@@ -179,7 +179,7 @@ static int seq_client_alloc_seq(const struct lu_env *env, seq->lcs_name, rc);return rc; } -CDEBUG (D_INFO ,"%s: New range - " DRANGE "\n" , +CDEBUG (D_INFO ,"%s: New range - " DRANGE "\n" , seq->lcs_name,PRANGE (&seq->lcs_space)); }else { rc =0 ;
drivers/staging/lustre/lustre/fid/lproc_fid.c +1 -1
@@ -105,7 +105,7 @@ ldebugfs_fid_space_seq_write(struct file *file, rc =ldebugfs_fid_write_common (buffer, count, &seq->lcs_space);if (rc ==0 ) { -CDEBUG (D_INFO ,"%s: Space: " DRANGE "\n" , +CDEBUG (D_INFO ,"%s: Space: " DRANGE "\n" , seq->lcs_name,PRANGE (&seq->lcs_space)); }
Signature · 1 line
2.7.4
Greg Kroah-Hartman
maintainerRe: [PATCH 1/6] staging: lustre: Add space b/w concatenated strings
Quoted 8 lines · Rehas Sachdeva
Fixes checkpatch.pl warning:
CHECK: Concatenated strings should use spaces between elementsSigned-off-by Rehas Sachdeva <[email protected]>--- drivers/staging/lustre/lustre/fid/fid_request.c | 8 ++++---- drivers/staging/lustre/lustre/fid/lproc_fid.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
Why are you sending Lustre driver patches to the linux-usb mailing list?
totally confused,
greg k-h
Re: [PATCH 1/6] staging: lustre: Add space b/w concatenated strings
Quoted 10 lines · Greg Kroah-Hartman
Quoted 8 lines · Rehas Sachdeva
Fixes checkpatch.pl warning:
CHECK: Concatenated strings should use spaces between elementsSigned-off-by Rehas Sachdeva <[email protected]>--- drivers/staging/lustre/lustre/fid/fid_request.c | 8 ++++---- drivers/staging/lustre/lustre/fid/lproc_fid.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-)
Quoted 5 lines
Why are you sending Lustre driver patches to the linux-usb mailing list?
totally confused,
greg k-h
Hi Greg,
I'm really sorry. It was coming by default. And I must forgotten to remove it. Anyways I fixed it now.
I'll be more careful next time. Thanks for pointing out the mistake.
Rehas
PATCH 2/6 staging: lustre: Fix block comment style
In reply to Rehas SachdevaFixes checkpatch.pl warning:
WARNING: Block comments use a trailing */ on a separate line.
--- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/lustre/lustre/ldlm/ldlm_request.c +4 -2
@@ -1410,7 +1410,8 @@ static int ldlm_prepare_lru_list(struct ldlm_namespace *ns,* That is, for shrinker policy we drop only * old locks, but additionally choose them by * their weight. Big extent locks will stay in -* the cache. */ +* the cache. +*/ result =pf (ns, lock, unused, added, count);if (result ==LDLM_POLICY_KEEP_LOCK ) { lu_ref_del(&lock->l_reference,
@@ -1700,7 +1701,8 @@ static int ldlm_cli_hash_cancel_unused(struct cfs_hash *hs,* that have 0 readers/writers. * * If flags & LCF_LOCAL, throw the locks away without trying -* to notify the server. */ +* to notify the server. +*/ int ldlm_cli_cancel_unused (struct ldlm_namespace *ns,const struct ldlm_res_id *res_id,enum ldlm_cancel_flags flags,void *opaque)
Signature · 1 line
2.7.4
PATCH 4/6 staging: lustre: Change 'seq_printf' to 'seq_puts'
In reply to Rehas SachdevaFixes checkpatch.pl warning: Prefer seq_puts to seq_printf. This can be done as both have same type of first two arguments in their function definition.
--- drivers/staging/lustre/lustre/llite/lproc_llite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/lustre/lustre/llite/lproc_llite.c +1 -1
@@ -774,7 +774,7 @@ static int ll_sbi_flags_seq_show(struct seq_file *m, void *v) flags >>=1 ; ++i; } -seq_printf (m,"\b\n" ); +seq_puts (m,"\b\n" );return 0 ; }
Signature · 1 line
2.7.4
PATCH 5/6 staging: lustre: Remove unnecessary 'return'
In reply to Rehas SachdevaFixes checkpatch.pl warning:
WARNING: void function return statements are not generally useful.
--- drivers/staging/lustre/lustre/llite/rw.c | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/lustre/lustre/llite/rw.c +0 -2
@@ -667,7 +667,6 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras, ras->ras_stride_length = stride_gap + ras->ras_consecutive_pages;RAS_CDEBUG (ras); -return ; }/* Stride Read-ahead window will be increased inc_len according to
@@ -883,7 +882,6 @@ out_unlock:RAS_CDEBUG (ras); ras->ras_request_index++;spin_unlock (&ras->ras_lock); -return ; }int ll_writepage (struct page *vmpage,struct writeback_control *wbc)
Signature · 1 line
2.7.4
Re: [Outreachy kernel] [PATCH 5/6] staging: lustre: Remove unnecessary 'return'
Quoted 2 lines · Rehas Sachdeva
Fixes checkpatch.pl warning:
WARNING: void function return statements are not generally useful.
It would be better to say what you did, rather than saying fix. Here you could say:
Remove unnecessary void return at the end of a function. Issue detected by checkpatch.
julia
Quoted 36 lines
Signed-off-by Rehas Sachdeva <[email protected]>--- drivers/staging/lustre/lustre/llite/rw.c | 2 -- 1 file changed, 2 deletions(-)drivers/staging/lustre/lustre/llite/rw.c +0
-3@@ -667,7 +667,6 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras, ras->ras_stride_length = stride_gap + ras->ras_consecutive_pages;RAS_CDEBUG (ras); -return ; }/* Stride Read-ahead window will be increased inc_len according to @@ -883,7 +882,6 @@ out_unlock:RAS_CDEBUG (ras); ras->ras_request_index++;spin_unlock (&ras->ras_lock); -return ; }int ll_writepage (struct page *vmpage,struct writeback_control *wbc) --2.7.4
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/bfedf0128abd4c08512b015481be1d5fd1d0d01e.1473923837.git.aquannie%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Re: [Outreachy kernel] [PATCH 5/6] staging: lustre: Remove unnecessary 'return'
Quoted 5 lines · Julia Lawall
Quoted 2 lines · Rehas Sachdeva
Fixes checkpatch.pl warning:
WARNING: void function return statements are not generally useful.
Quoted 8 lines
It would be better to say what you did, rather than saying fix. Here you could say:
Remove unnecessary void return at the end of a function. Issue detected by checkpatch.
julia
Right. Thanks for the feedback Julia. I'll change it right away and be more careful next time.
Rehas
Quoted 37 lines
Quoted 37 lines
Signed-off-by Rehas Sachdeva <[email protected]>--- drivers/staging/lustre/lustre/llite/rw.c | 2 -- 1 file changed, 2 deletions(-)drivers/staging/lustre/lustre/llite/rw.c +0
-3@@ -667,7 +667,6 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras, ras->ras_stride_length = stride_gap + ras->ras_consecutive_pages;RAS_CDEBUG (ras); -return ; }/* Stride Read-ahead window will be increased inc_len according to @@ -883,7 +882,6 @@ out_unlock:RAS_CDEBUG (ras); ras->ras_request_index++;spin_unlock (&ras->ras_lock); -return ; }int ll_writepage (struct page *vmpage,struct writeback_control *wbc) --2.7.4
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/bfedf0128abd4c08512b015481be1d5fd1d0d01e.1473923837.git.aquannie%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Re: [Outreachy kernel] [PATCH 5/6] staging: lustre: Remove unnecessary 'return'
In reply to Julia LawallQuoted 5 lines · Julia Lawall
Quoted 2 lines · Rehas Sachdeva
Fixes checkpatch.pl warning:
WARNING: void function return statements are not generally useful.
Quoted 8 lines
It would be better to say what you did, rather than saying fix. Here you could say:
Remove unnecessary void return at the end of a function. Issue detected by checkpatch.
julia
Hi Julia,
Please take a look at v2. Also please suggest if I should make similar changes to the commit messages on other patches in this patchset as well. Thanks.
Rehas
Quoted 37 lines
Quoted 37 lines
Signed-off-by Rehas Sachdeva <[email protected]>--- drivers/staging/lustre/lustre/llite/rw.c | 2 -- 1 file changed, 2 deletions(-)drivers/staging/lustre/lustre/llite/rw.c +0
-3@@ -667,7 +667,6 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras, ras->ras_stride_length = stride_gap + ras->ras_consecutive_pages;RAS_CDEBUG (ras); -return ; }/* Stride Read-ahead window will be increased inc_len according to @@ -883,7 +882,6 @@ out_unlock:RAS_CDEBUG (ras); ras->ras_request_index++;spin_unlock (&ras->ras_lock); -return ; }int ll_writepage (struct page *vmpage,struct writeback_control *wbc) --2.7.4
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/bfedf0128abd4c08512b015481be1d5fd1d0d01e.1473923837.git.aquannie%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
PATCH 6/6 staging: lustre: Fix indentation
In reply to Rehas SachdevaFixes checkpatch.pl warning: Statements should start on a tabstop.
--- drivers/staging/lustre/lustre/llite/file.c | 2 +- drivers/staging/lustre/lustre/llite/rw.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/lustre/lustre/llite/file.c +1 -1
@@ -602,7 +602,7 @@ restart: }else if (it->it_flags &FMODE_EXEC ) { och_p = &lli->lli_mds_exec_och; och_usecount = &lli->lli_open_fd_exec_count; - }else { + }else { och_p = &lli->lli_mds_read_och; och_usecount = &lli->lli_open_fd_read_count; }
drivers/staging/lustre/lustre/llite/rw.c +1 -1
@@ -1022,7 +1022,7 @@ int ll_writepages(struct address_space *mapping, struct writeback_control *wbc)if (result >0 ) { wbc->nr_to_write -= result; result =0 ; - } + }if (wbc->range_cyclic || (range_whole && wbc->nr_to_write >0 )) {if (end ==OBD_OBJECT_EOF )
Signature · 1 line
2.7.4