staging: luster: do not combine value 0 with |
authorGeorgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Tue, 18 Mar 2014 15:26:57 +0000 (17:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Mar 2014 19:19:32 +0000 (12:19 -0700)
There is no point in combining a variable
that is 0 with other things with |

The semantic patch used:

@@
expression x,e,e1;
statement S;
@@

if (x == 0) {
 <... when != x = e1
      when != while(...) S
      when != for(...;...;...) S

-  x |= e
+  x  = e
  ...>
}

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/llite_mmap.c

index f0bc4bf9986bfbebcfe9e2690e65ba6500a7d2b4..90b2c0d275f9e17ead658b67abda524524d78678 100644 (file)
@@ -370,7 +370,7 @@ restart:
                        goto restart;
                }
 
-               result |= VM_FAULT_LOCKED;
+               result = VM_FAULT_LOCKED;
        }
        cfs_restore_sigs(set);
        return result;