Skip to contentSkip to conversation

linux/bitops: Move BIT defination at top

PATCH Superseded Jagan Teki 2 participants 2 messages Oct 21, 2015 Bitops API

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH v2 1/2 linux/bitops: Move BIT defination at top

Since it's a copy from Linux, this patch moved all BIT definations to top so-that it looks same as Linux file.

---
Changes for v2:
- Added tab space for BIT(nr)

 include/linux/bitops.h | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
include/linux/bitops.h +3 -4
index 7d30ace..e9bb827 100644
@@ -3,7 +3,9 @@
 
 #include <asm/types.h>
 
-#define BIT(nr)		(1UL << (nr))
+#define BIT(nr)			(1UL << (nr))
+#define BIT_MASK(nr)		(1UL << ((nr) % BITS_PER_LONG))
+#define BIT_WORD(nr)		((nr) / BITS_PER_LONG)
 
 /*
  * ffs: find first bit set. This is defined the same way as
@@ -106,9 +108,6 @@ static inline unsigned int generic_hweight8(unsigned int w)
 	return (res & 0x0F) + ((res >> 4) & 0x0F);
 }
 
-#define BIT_MASK(nr)		(1UL << ((nr) % BITS_PER_LONG))
-#define BIT_WORD(nr)		((nr) / BITS_PER_LONG)
-
 #include <asm/bitops.h>
 
 /* linux/include/asm-generic/bitops/non-atomic.h */
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/2 linux/bitops: Move BIT defination at top

Hello Jagan,

Typo in subject / commit summary: defination -> definition.

Amicalement,

Signature · 1 line
Albert.