Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
[sfrench/cifs-2.6.git] / include / linux / bitops.h
index 7ddb1349394dbc4472779592ce590366d7571094..705f7c44269177d232a57c8f25ca00ba7faf9482 100644 (file)
@@ -236,33 +236,33 @@ static __always_inline void __assign_bit(long nr, volatile unsigned long *addr,
 #ifdef __KERNEL__
 
 #ifndef set_mask_bits
-#define set_mask_bits(ptr, _mask, _bits)       \
+#define set_mask_bits(ptr, mask, bits) \
 ({                                                             \
-       const typeof(*ptr) mask = (_mask), bits = (_bits);      \
-       typeof(*ptr) old, new;                                  \
+       const typeof(*(ptr)) mask__ = (mask), bits__ = (bits);  \
+       typeof(*(ptr)) old__, new__;                            \
                                                                \
        do {                                                    \
-               old = READ_ONCE(*ptr);                  \
-               new = (old & ~mask) | bits;                     \
-       } while (cmpxchg(ptr, old, new) != old);                \
+               old__ = READ_ONCE(*(ptr));                      \
+               new__ = (old__ & ~mask__) | bits__;             \
+       } while (cmpxchg(ptr, old__, new__) != old__);          \
                                                                \
-       new;                                                    \
+       new__;                                                  \
 })
 #endif
 
 #ifndef bit_clear_unless
-#define bit_clear_unless(ptr, _clear, _test)   \
+#define bit_clear_unless(ptr, clear, test)     \
 ({                                                             \
-       const typeof(*ptr) clear = (_clear), test = (_test);    \
-       typeof(*ptr) old, new;                                  \
+       const typeof(*(ptr)) clear__ = (clear), test__ = (test);\
+       typeof(*(ptr)) old__, new__;                            \
                                                                \
        do {                                                    \
-               old = READ_ONCE(*ptr);                  \
-               new = old & ~clear;                             \
-       } while (!(old & test) &&                               \
-                cmpxchg(ptr, old, new) != old);                \
+               old__ = READ_ONCE(*(ptr));                      \
+               new__ = old__ & ~clear__;                       \
+       } while (!(old__ & test__) &&                           \
+                cmpxchg(ptr, old__, new__) != old__);          \
                                                                \
-       !(old & test);                                          \
+       !(old__ & test__);                                      \
 })
 #endif