From: Elise Lennion Date: Sun, 23 Oct 2016 00:30:44 +0000 (-0200) Subject: staging: lustre: Move assignments out of function calls. X-Git-Tag: v4.14-rc1~1919^2~477 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a6ec5bb812fdaab5e2b7e73d4527c7cc477448a2;p=platform%2Fkernel%2Flinux-rpi.git staging: lustre: Move assignments out of function calls. Assignments inside of function calls confuse the reader and should be avoided, so it was moved out before the call. Found with Coccinelle, semantic patch: @@ identifier f; expression e1, e2; assignment operator a; @@ + e1 a e2; f(..., - (e1 a e2) + e1 ,...); Signed-off-by: Elise Lennion Reviewed-by: Andreas Dilger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/llite/vvp_io.c b/drivers/staging/lustre/lustre/llite/vvp_io.c index 1a4b897..87fdab2 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_io.c +++ b/drivers/staging/lustre/lustre/llite/vvp_io.c @@ -450,7 +450,8 @@ static void vvp_io_advance(const struct lu_env *env, struct vvp_io *vio = cl2vvp_io(env, ios); CLOBINVRNT(env, obj, vvp_object_invariant(obj)); - iov_iter_reexpand(vio->vui_iter, vio->vui_tot_count -= nob); + vio->vui_tot_count -= nob; + iov_iter_reexpand(vio->vui_iter, vio->vui_tot_count); } static void vvp_io_update_iov(const struct lu_env *env,