]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Staging: lustre: ptlrpc: Prefer using the BIT macro
authorShraddha Barke <shraddha.6596@gmail.com>
Thu, 10 Sep 2015 16:32:40 +0000 (22:02 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 13 Sep 2015 01:24:57 +0000 (18:24 -0700)
This patch replaces bit shifting on 1 with the BIT(x) macro

This was done with coccinelle:
@@ int g; @@

-(1 << g)
+BIT(g)

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ptlrpc/layout.c

index d14c200088507739b85a248342dadeb96a4ebf7f..5d19cfcfe7e9f1bee6448a1386c35e8d8f39634f 100644 (file)
@@ -789,17 +789,17 @@ enum rmf_flags {
        /**
         * The field is a string, must be NUL-terminated.
         */
-       RMF_F_STRING = 1 << 0,
+       RMF_F_STRING = BIT(0),
        /**
         * The field's buffer size need not match the declared \a rmf_size.
         */
-       RMF_F_NO_SIZE_CHECK = 1 << 1,
+       RMF_F_NO_SIZE_CHECK = BIT(1),
        /**
         * The field's buffer size must be a whole multiple of the declared \a
         * rmf_size and the \a rmf_swabber function must work on the declared \a
         * rmf_size worth of bytes.
         */
-       RMF_F_STRUCT_ARRAY = 1 << 2
+       RMF_F_STRUCT_ARRAY = BIT(2)
 };
 
 struct req_capsule;