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

index 940f73f266d18e5dc477e9a1f2338e773010cc75..11630180c5e7b4a2815cb28bb4021d5f043c20a0 100644 (file)
@@ -303,7 +303,7 @@ static inline int LNetHandleIsEqual(lnet_handle_any_t h1, lnet_handle_any_t h2)
  */
 static inline int LNetHandleIsInvalid(lnet_handle_any_t h)
 {
-       return LNET_WIRE_HANDLE_COOKIE_NONE == h.cookie;
+       return h.cookie == LNET_WIRE_HANDLE_COOKIE_NONE;
 }
 
 /**
This page took 0.028731 seconds and 5 git commands to generate.