From 159dc4bff27a300d2c70108bf49ae01f6d1b34f2 Mon Sep 17 00:00:00 2001 From: Aya Mahfouz Date: Wed, 4 Mar 2015 07:29:28 +0200 Subject: [PATCH] staging: lustre: lclient: remove extra parentheses around right bit shift operation Removes extra parentheses around bitwise right shift operations. The cases handled here are when the resultant value is assigned to a variable. The issue was detected and resolved using the following coccinelle script: @@ expression e, e1; constant c; @@ e = -(e1 +e1 >> -c); +c; @@ identifier i; constant c; type t; expression e; @@ t i = -(e +e >> -c); +c; @@ expression e, e1; identifier f; constant c; @@ e1 = f(..., -(e +e >> -c) +c ,...); Signed-off-by: Aya Mahfouz Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lustre/lclient/lcommon_cl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c index 23095bb75226..ab6cb419302f 100644 --- a/drivers/staging/lustre/lustre/lclient/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/lclient/lcommon_cl.c @@ -828,7 +828,8 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj, * --bug 17336 */ loff_t size = cl_isize_read(inode); loff_t cur_index = start >> PAGE_CACHE_SHIFT; - loff_t size_index = ((size - 1) >> PAGE_CACHE_SHIFT); + loff_t size_index = (size - 1) >> + PAGE_CACHE_SHIFT; if ((size == 0 && cur_index != 0) || size_index < cur_index) @@ -1263,7 +1264,7 @@ __u32 cl_fid_build_gen(const struct lu_fid *fid) return gen; } - gen = (fid_flatten(fid) >> 32); + gen = fid_flatten(fid) >> 32; return gen; } -- 2.39.5