mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging : osc : coding style fix
@ 2016-12-14 21:11 Tabrez khan
  2016-12-14 21:27 ` Dilger, Andreas
  0 siblings, 1 reply; 2+ messages in thread
From: Tabrez khan @ 2016-12-14 21:11 UTC (permalink / raw)
  To: andreas.dilger, jsimmons; +Cc: gregkh, lustre-devel, devel, linux-kernel

Remove unnecessary braces {} for single if statement block.
This warning is found using checkpatch.pl.

Signed-off-by: Tabrez khan <khan.tabrez21@gmail.com>
---
 drivers/staging/lustre/lustre/osc/osc_cache.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c
index 4bbe219..5ded31a 100644
--- a/drivers/staging/lustre/lustre/osc/osc_cache.c
+++ b/drivers/staging/lustre/lustre/osc/osc_cache.c
@@ -1420,10 +1420,8 @@ static void osc_release_write_grant(struct client_obd *cli,
 				    struct brw_page *pga)
 {
 	assert_spin_locked(&cli->cl_loi_list_lock);
-	if (!(pga->flag & OBD_BRW_FROM_GRANT)) {
+	if (!(pga->flag & OBD_BRW_FROM_GRANT))
 		return;
-	}
-
 	pga->flag &= ~OBD_BRW_FROM_GRANT;
 	atomic_long_dec(&obd_dirty_pages);
 	cli->cl_dirty_pages--;
-- 
2.7.4

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

* Re: [PATCH] staging : osc : coding style fix
  2016-12-14 21:11 [PATCH] staging : osc : coding style fix Tabrez khan
@ 2016-12-14 21:27 ` Dilger, Andreas
  0 siblings, 0 replies; 2+ messages in thread
From: Dilger, Andreas @ 2016-12-14 21:27 UTC (permalink / raw)
  To: Tabrez khan; +Cc: jsimmons, gregkh, lustre-devel, devel, linux-kernel

On Dec 14, 2016, at 14:11, Tabrez khan <khan.tabrez21@gmail.com> wrote:
> 
> Subject: [PATCH] staging : osc : coding style fix

Thanks for sumbitting your patch.

As a general rule, the patch summary line should try to describe
(as best as possible in a single line) what the patch is actually
fixing.  It is true this is a "coding style fix" but there are
many possible style fixes and it is better to be as specific as
space allows.  Something like:

    staging/lustre/osc: remove unnecessary braces

or
    staging/lustre/osc: remove braces from single-line body

or
    staging/lustre/osc: remove braces in osc_release_write_grant()

would be more specific.  This is doubly important if you are
making a large number of similar patches, since it is desirable
to have a (relatively) unique summary line for each patch to
avoid confusion.

> Remove unnecessary braces {} for single if statement block.
> This warning is found using checkpatch.pl.

The commit body is good.

Please resubmit with a new summary line, then you can include:

Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>

Cheers, Andreas

> Signed-off-by: Tabrez khan <khan.tabrez21@gmail.com>
> ---
> drivers/staging/lustre/lustre/osc/osc_cache.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c
> index 4bbe219..5ded31a 100644
> --- a/drivers/staging/lustre/lustre/osc/osc_cache.c
> +++ b/drivers/staging/lustre/lustre/osc/osc_cache.c
> @@ -1420,10 +1420,8 @@ static void osc_release_write_grant(struct client_obd *cli,
> 				    struct brw_page *pga)
> {
> 	assert_spin_locked(&cli->cl_loi_list_lock);
> -	if (!(pga->flag & OBD_BRW_FROM_GRANT)) {
> +	if (!(pga->flag & OBD_BRW_FROM_GRANT))
> 		return;
> -	}
> -
> 	pga->flag &= ~OBD_BRW_FROM_GRANT;
> 	atomic_long_dec(&obd_dirty_pages);
> 	cli->cl_dirty_pages--;
> -- 
> 2.7.4
> 

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

end of thread, other threads:[~2016-12-14 21:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-14 21:11 [PATCH] staging : osc : coding style fix Tabrez khan
2016-12-14 21:27 ` Dilger, Andreas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome