Staging: lustre: Remove unnecessary else after return
PATCH 1/1 Staging: lustre: 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 lcommon_cl.c
Signed-off-by aybuke ozdemir <[email protected]>
--- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/lustre/lustre/lclient/lcommon_cl.c +2 -1
@@ -834,7 +834,7 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj, size_index < cur_index) *exceed =1 ; } -return result; + goto out; }else {/* * region is within kms and, hence, within real file
@@ -857,6 +857,7 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj, } }ccc_object_size_unlock (obj); +out:return result; }
Signature · 1 line
1.9.1
Quoted 7 lines · aybuke ozdemir
This patch fixes "else is not generally useful after
a break or return" checkpatch.pl warning using goto statement inlcommon_cl.cSigned-off-by aybuke ozdemir <[email protected]>--- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Looks good to me.
Jes
Quoted 22 lines
drivers/staging/lustre/lustre/lclient/lcommon_cl.c +2
-1@@ -834,7 +834,7 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj, size_index < cur_index) *exceed =1 ; } -return result; + goto out; }else {/* * region is within kms and, hence, within real file @@ -857,6 +857,7 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj, } }ccc_object_size_unlock (obj); +out:return result; }