staging : osc : coding style fix
PATCH 1/1 staging : osc : coding style fix
Remove unnecessary braces {} for single if statement block. This warning is found using checkpatch.pl.
--- drivers/staging/lustre/lustre/osc/osc_cache.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/lustre/lustre/osc/osc_cache.c +1 -3
@@ -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--;
Signature · 1 line
2.7.4
Quoted 2 lines · Tabrez khan
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.
Quoted 2 lines
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:
Cheers, Andreas
Quoted 24 lines
Signed-off-by Tabrez khan <[email protected]>---
drivers/staging/lustre/lustre/osc/osc_cache.c| 4 +---1 file changed, 1 insertion(+), 3 deletions(-)drivers/staging/lustre/lustre/osc/osc_cache.c +1
-3@@ -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--;Signature · 1 line
2.7.4