staging: lustre: osc: put constant on the right of binary operator
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 29 Aug 2015 17:30:11 +0000 (19:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:13 +0000 (18:24 -0700)
Move constants to the right of binary operators.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
constant c;
expression e;
binary operator b = {==,!=,&,|};
@@

(
- c
+ e
b
- e
+ c
|
- c < e
+ e > c
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/osc/osc_page.c

index f9cf5cea643d8f846a4b10ca243818fd6c4def32..856d859c385e26a0c3915fe9d0a6451e8a6d73cb 100644 (file)
@@ -553,7 +553,7 @@ void osc_page_submit(const struct lu_env *env, struct osc_page *opg,
        oap->oap_cmd = crt == CRT_WRITE ? OBD_BRW_WRITE : OBD_BRW_READ;
        oap->oap_page_off = opg->ops_from;
        oap->oap_count = opg->ops_to - opg->ops_from;
-       oap->oap_brw_flags = OBD_BRW_SYNC | brw_flags;
+       oap->oap_brw_flags = brw_flags | OBD_BRW_SYNC;
 
        if (!client_is_remote(osc_export(obj)) &&
                        capable(CFS_CAP_SYS_RESOURCE)) {