From: Bhumika Goyal Date: Tue, 16 Feb 2016 19:31:58 +0000 (+0530) Subject: Staging: lustre: lov: Pull assignments out of function call X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=496baea013b6c9ef7eaf80facc50b4317e5cd39c;p=openwrt%2Fstaging%2Fblogic.git Staging: lustre: lov: Pull assignments out of function call Assignments in function call arguments are undesirable. So pull such assignments out before function call. Made a coccinelle script to detect such cases: @@ expression fn,b,d; @@ * fn(...,d=b,...); Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/lov/lov_merge.c b/drivers/staging/lustre/lustre/lov/lov_merge.c index 97115bec7cca..029cd4d62796 100644 --- a/drivers/staging/lustre/lustre/lov/lov_merge.c +++ b/drivers/staging/lustre/lustre/lov/lov_merge.c @@ -129,7 +129,8 @@ int lov_adjust_kms(struct obd_export *exp, struct lov_stripe_md *lsm, "stripe %d KMS %sing %llu->%llu\n", stripe, kms > loi->loi_kms ? "increase":"shrink", loi->loi_kms, kms); - loi_kms_set(loi, loi->loi_lvb.lvb_size = kms); + loi->loi_lvb.lvb_size = kms; + loi_kms_set(loi, loi->loi_lvb.lvb_size); } return 0; }