mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-16 01:24:08 +08:00
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 <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
25ff6f8da0
commit
159dc4bff2
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user