Staging: lustre: obd: put constant on the right of binary operator
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 29 Aug 2015 17:30:10 +0000 (19:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:12 +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/obdclass/cl_object.c

index c1a9b819e95adf1d236cacf4899f1795f331de18..8f17d7c4f28e5b9f2327edb3a8625972b2aaf06e 100644 (file)
@@ -694,10 +694,10 @@ static struct lu_env *cl_env_new(__u32 ctx_tags, __u32 ses_tags, void *debug)
                INIT_LIST_HEAD(&cle->ce_linkage);
                cle->ce_magic = &cl_env_init0;
                env = &cle->ce_lu;
-               rc = lu_env_init(env, LCT_CL_THREAD|ctx_tags);
+               rc = lu_env_init(env, ctx_tags | LCT_CL_THREAD);
                if (rc == 0) {
                        rc = lu_context_init(&cle->ce_ses,
-                                            LCT_SESSION | ses_tags);
+                                            ses_tags | LCT_SESSION);
                        if (rc == 0) {
                                lu_context_enter(&cle->ce_ses);
                                env->le_ses = &cle->ce_ses;