* [PATCH 1/6] staging: lustre: Add space b/w concatenated strings
2016-09-15 8:04 [PATCH 0/6] staging: lustre: Fix multiple checkpatch warnings Rehas Sachdeva
@ 2016-09-15 8:04 ` Rehas Sachdeva
2016-09-15 10:19 ` Greg Kroah-Hartman
2016-09-15 8:05 ` [PATCH 2/6] staging: lustre: Fix block comment style Rehas Sachdeva
` (3 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Rehas Sachdeva @ 2016-09-15 8:04 UTC (permalink / raw)
To: outreachy-kernel
Cc: linux-usb, Oleg Drokin, Andreas Dilger, James Simmons,
Greg Kroah-Hartman
Fixes checkpatch.pl warning:
CHECK: Concatenated strings should use spaces between elements
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
---
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(-)
diff --git a/drivers/staging/lustre/lustre/fid/fid_request.c b/drivers/staging/lustre/lustre/fid/fid_request.c
index 454744d..edd72b9 100644
--- a/drivers/staging/lustre/lustre/fid/fid_request.c
+++ b/drivers/staging/lustre/lustre/fid/fid_request.c
@@ -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;
diff --git a/drivers/staging/lustre/lustre/fid/lproc_fid.c b/drivers/staging/lustre/lustre/fid/lproc_fid.c
index 81b7ca9..3ed32d7 100644
--- a/drivers/staging/lustre/lustre/fid/lproc_fid.c
+++ b/drivers/staging/lustre/lustre/fid/lproc_fid.c
@@ -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));
}
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [PATCH 1/6] staging: lustre: Add space b/w concatenated strings
2016-09-15 8:04 ` [PATCH 1/6] staging: lustre: Add space b/w concatenated strings Rehas Sachdeva
@ 2016-09-15 10:19 ` Greg Kroah-Hartman
2016-09-15 11:58 ` Rehas Sachdeva
0 siblings, 1 reply; 11+ messages in thread
From: Greg Kroah-Hartman @ 2016-09-15 10:19 UTC (permalink / raw)
To: Rehas Sachdeva
Cc: outreachy-kernel, linux-usb, Oleg Drokin, Andreas Dilger,
James Simmons
On Thu, Sep 15, 2016 at 01:34:48PM +0530, Rehas Sachdeva wrote:
> Fixes checkpatch.pl warning:
> CHECK: Concatenated strings should use spaces between elements
>
> Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
> ---
> 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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/6] staging: lustre: Add space b/w concatenated strings
2016-09-15 10:19 ` Greg Kroah-Hartman
@ 2016-09-15 11:58 ` Rehas Sachdeva
0 siblings, 0 replies; 11+ messages in thread
From: Rehas Sachdeva @ 2016-09-15 11:58 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: outreachy-kernel, Oleg Drokin, Andreas Dilger, James Simmons
On Thu, Sep 15, 2016 at 12:19:08PM +0200, Greg Kroah-Hartman wrote:
> On Thu, Sep 15, 2016 at 01:34:48PM +0530, Rehas Sachdeva wrote:
> > Fixes checkpatch.pl warning:
> > CHECK: Concatenated strings should use spaces between elements
> >
> > Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
> > ---
> > 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
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/6] staging: lustre: Fix block comment style
2016-09-15 8:04 [PATCH 0/6] staging: lustre: Fix multiple checkpatch warnings Rehas Sachdeva
2016-09-15 8:04 ` [PATCH 1/6] staging: lustre: Add space b/w concatenated strings Rehas Sachdeva
@ 2016-09-15 8:05 ` Rehas Sachdeva
2016-09-15 8:06 ` [PATCH 4/6] staging: lustre: Change 'seq_printf' to 'seq_puts' Rehas Sachdeva
` (2 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Rehas Sachdeva @ 2016-09-15 8:05 UTC (permalink / raw)
To: outreachy-kernel
Cc: linux-usb, Oleg Drokin, Andreas Dilger, James Simmons,
Greg Kroah-Hartman
Fixes checkpatch.pl warning:
WARNING: Block comments use a trailing */ on a separate line.
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
---
drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
index 1dc8d21..f4364f9 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c
@@ -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)
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread* [PATCH 4/6] staging: lustre: Change 'seq_printf' to 'seq_puts'
2016-09-15 8:04 [PATCH 0/6] staging: lustre: Fix multiple checkpatch warnings Rehas Sachdeva
2016-09-15 8:04 ` [PATCH 1/6] staging: lustre: Add space b/w concatenated strings Rehas Sachdeva
2016-09-15 8:05 ` [PATCH 2/6] staging: lustre: Fix block comment style Rehas Sachdeva
@ 2016-09-15 8:06 ` Rehas Sachdeva
2016-09-15 8:07 ` [PATCH 5/6] staging: lustre: Remove unnecessary 'return' Rehas Sachdeva
2016-09-15 8:08 ` [PATCH 6/6] staging: lustre: Fix indentation Rehas Sachdeva
4 siblings, 0 replies; 11+ messages in thread
From: Rehas Sachdeva @ 2016-09-15 8:06 UTC (permalink / raw)
To: outreachy-kernel
Cc: linux-usb, Oleg Drokin, Andreas Dilger, James Simmons,
Greg Kroah-Hartman
Fixes 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.
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
---
drivers/staging/lustre/lustre/llite/lproc_llite.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c
index 4e82db8..af233ea 100644
--- a/drivers/staging/lustre/lustre/llite/lproc_llite.c
+++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c
@@ -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;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 5/6] staging: lustre: Remove unnecessary 'return'
2016-09-15 8:04 [PATCH 0/6] staging: lustre: Fix multiple checkpatch warnings Rehas Sachdeva
` (2 preceding siblings ...)
2016-09-15 8:06 ` [PATCH 4/6] staging: lustre: Change 'seq_printf' to 'seq_puts' Rehas Sachdeva
@ 2016-09-15 8:07 ` Rehas Sachdeva
2016-09-15 8:10 ` [Outreachy kernel] " Julia Lawall
2016-09-15 8:08 ` [PATCH 6/6] staging: lustre: Fix indentation Rehas Sachdeva
4 siblings, 1 reply; 11+ messages in thread
From: Rehas Sachdeva @ 2016-09-15 8:07 UTC (permalink / raw)
To: outreachy-kernel
Cc: linux-usb, Oleg Drokin, Andreas Dilger, James Simmons,
Greg Kroah-Hartman
Fixes checkpatch.pl warning:
WARNING: void function return statements are not generally useful.
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
---
drivers/staging/lustre/lustre/llite/rw.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/llite/rw.c b/drivers/staging/lustre/lustre/llite/rw.c
index bb85d16..23747fa 100644
--- a/drivers/staging/lustre/lustre/llite/rw.c
+++ b/drivers/staging/lustre/lustre/llite/rw.c
@@ -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
^ permalink raw reply related [flat|nested] 11+ messages in thread* Re: [Outreachy kernel] [PATCH 5/6] staging: lustre: Remove unnecessary 'return'
2016-09-15 8:07 ` [PATCH 5/6] staging: lustre: Remove unnecessary 'return' Rehas Sachdeva
@ 2016-09-15 8:10 ` Julia Lawall
2016-09-15 12:03 ` Rehas Sachdeva
2016-09-15 12:58 ` Rehas Sachdeva
0 siblings, 2 replies; 11+ messages in thread
From: Julia Lawall @ 2016-09-15 8:10 UTC (permalink / raw)
To: Rehas Sachdeva
Cc: outreachy-kernel, linux-usb, Oleg Drokin, Andreas Dilger,
James Simmons, Greg Kroah-Hartman
On Thu, 15 Sep 2016, Rehas Sachdeva wrote:
> 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
>
> Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
> ---
> drivers/staging/lustre/lustre/llite/rw.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/staging/lustre/lustre/llite/rw.c b/drivers/staging/lustre/lustre/llite/rw.c
> index bb85d16..23747fa 100644
> --- a/drivers/staging/lustre/lustre/llite/rw.c
> +++ b/drivers/staging/lustre/lustre/llite/rw.c
> @@ -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 outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> 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.
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Outreachy kernel] [PATCH 5/6] staging: lustre: Remove unnecessary 'return'
2016-09-15 8:10 ` [Outreachy kernel] " Julia Lawall
@ 2016-09-15 12:03 ` Rehas Sachdeva
2016-09-15 12:58 ` Rehas Sachdeva
1 sibling, 0 replies; 11+ messages in thread
From: Rehas Sachdeva @ 2016-09-15 12:03 UTC (permalink / raw)
To: Julia Lawall
Cc: outreachy-kernel, Oleg Drokin, Andreas Dilger, James Simmons,
Greg Kroah-Hartman
On Thu, Sep 15, 2016 at 10:10:49AM +0200, Julia Lawall wrote:
> On Thu, 15 Sep 2016, Rehas Sachdeva wrote:
>
> > 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
>
Right. Thanks for the feedback Julia. I'll change it right away and be more
careful next time.
Rehas
>
> >
> > Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
> > ---
> > drivers/staging/lustre/lustre/llite/rw.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/staging/lustre/lustre/llite/rw.c b/drivers/staging/lustre/lustre/llite/rw.c
> > index bb85d16..23747fa 100644
> > --- a/drivers/staging/lustre/lustre/llite/rw.c
> > +++ b/drivers/staging/lustre/lustre/llite/rw.c
> > @@ -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 outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > 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.
> >
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Outreachy kernel] [PATCH 5/6] staging: lustre: Remove unnecessary 'return'
2016-09-15 8:10 ` [Outreachy kernel] " Julia Lawall
2016-09-15 12:03 ` Rehas Sachdeva
@ 2016-09-15 12:58 ` Rehas Sachdeva
1 sibling, 0 replies; 11+ messages in thread
From: Rehas Sachdeva @ 2016-09-15 12:58 UTC (permalink / raw)
To: Julia Lawall
Cc: outreachy-kernel, Oleg Drokin, Andreas Dilger, James Simmons,
Greg Kroah-Hartman
On Thu, Sep 15, 2016 at 10:10:49AM +0200, Julia Lawall wrote:
> On Thu, 15 Sep 2016, Rehas Sachdeva wrote:
>
> > 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
>
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
>
> >
> > Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
> > ---
> > drivers/staging/lustre/lustre/llite/rw.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/staging/lustre/lustre/llite/rw.c b/drivers/staging/lustre/lustre/llite/rw.c
> > index bb85d16..23747fa 100644
> > --- a/drivers/staging/lustre/lustre/llite/rw.c
> > +++ b/drivers/staging/lustre/lustre/llite/rw.c
> > @@ -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 outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > 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.
> >
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 6/6] staging: lustre: Fix indentation
2016-09-15 8:04 [PATCH 0/6] staging: lustre: Fix multiple checkpatch warnings Rehas Sachdeva
` (3 preceding siblings ...)
2016-09-15 8:07 ` [PATCH 5/6] staging: lustre: Remove unnecessary 'return' Rehas Sachdeva
@ 2016-09-15 8:08 ` Rehas Sachdeva
4 siblings, 0 replies; 11+ messages in thread
From: Rehas Sachdeva @ 2016-09-15 8:08 UTC (permalink / raw)
To: outreachy-kernel
Cc: linux-usb, Oleg Drokin, Andreas Dilger, James Simmons,
Greg Kroah-Hartman
Fixes checkpatch.pl warning: Statements should start on a tabstop.
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
---
drivers/staging/lustre/lustre/llite/file.c | 2 +-
drivers/staging/lustre/lustre/llite/rw.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
index e2e81bf..bfac6dd 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -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;
}
diff --git a/drivers/staging/lustre/lustre/llite/rw.c b/drivers/staging/lustre/lustre/llite/rw.c
index 23747fa..25de3bf 100644
--- a/drivers/staging/lustre/lustre/llite/rw.c
+++ b/drivers/staging/lustre/lustre/llite/rw.c
@@ -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)
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread