Staging: lustre: lustre: fid: Remove unnecessary else after return
PATCH v2 1/1 Staging: lustre: lustre: fid: Remove unnecessary else after return
This patch fixes "else is not generally useful after
a break or return" checkpatch.pl warning using goto statement in fid_request.c
---
Changes since v1:
* removed the "else" block instead of goto statement was used and a commit message has been corrected.
--- drivers/staging/lustre/lustre/fid/fid_request.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/lustre/lustre/fid/fid_request.c +2 -2
@@ -200,7 +200,7 @@ static int seq_client_alloc_seq(const struct lu_env *env,if (rc) {CERROR ("%s: Can't allocate new meta-sequence, rc %d\n" , seq->lcs_name, rc); -return rc; + goto out; }else {CDEBUG (D_INFO ,"%s: New range - " DRANGE "\n" , seq->lcs_name,PRANGE (&seq->lcs_space));
@@ -215,7 +215,7 @@ static int seq_client_alloc_seq(const struct lu_env *env,CDEBUG (D_INFO ,"%s: Allocated sequence [%#llx]\n" , seq->lcs_name, *seqnr); - +out:return rc; }
Signature · 1 line
1.9.1
Greg KH
maintainerQuoted 17 lines · aybuke ozdemir
This patch fixes "else is not generally useful after
a break or return" checkpatch.pl warning using goto statement infid_request.cSigned-off-by aybuke ozdemir <[email protected]>---
Changes since v1:
* removed the "else" block instead of goto statement was used and a commit message has been corrected.--- drivers/staging/lustre/lustre/fid/fid_request.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/lustre/lustre/fid/fid_request.c +0
-0
drivers/staging/lustre/lustre/fid/fid_request.c static int seq_client_alloc_seq(const struct lu_env *env, · line 203
Quoted 5 lines
drivers/staging/lustre/lustre/fid/fid_request.c +1
-1@@ -200,7 +200,7 @@ static int seq_client_alloc_seq(const struct lu_env *env,if (rc) {CERROR ("%s: Can't allocate new meta-sequence, rc %d\n" , seq->lcs_name, rc); -return rc; + goto out;
No need for this, just remove the else line below here instead.
drivers/staging/lustre/lustre/fid/fid_request.c static int seq_client_alloc_seq(const struct lu_env *env, · line 206
Quoted 3 lines
drivers/staging/lustre/lustre/fid/fid_request.c +0
-0}else {CDEBUG (D_INFO ,"%s: New range - " DRANGE "\n" , seq->lcs_name,PRANGE (&seq->lcs_space));
thanks,
greg k-h