staging: lustre: lnet: lib-ptl.c: put constant on the right of binary operator
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 29 Aug 2015 17:30:06 +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/lnet/lnet/lib-ptl.c

index 84707c5cb46472035d357578b56a57397bacf397..b4f573ab62ccc5aa53d52c09701ab52cab2f1040 100644 (file)
@@ -420,9 +420,9 @@ lnet_mt_match_md(struct lnet_match_table *mtable,
 
        if (info->mi_opc == LNET_MD_OP_GET ||
            !lnet_ptl_is_lazy(the_lnet.ln_portals[info->mi_portal]))
-               return LNET_MATCHMD_DROP | exhausted;
+               return exhausted | LNET_MATCHMD_DROP;
 
-       return LNET_MATCHMD_NONE | exhausted;
+       return exhausted | LNET_MATCHMD_NONE;
 }
 
 static int
This page took 0.033873 seconds and 5 git commands to generate.