summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJagan Teki <jteki@openedev.com>2015-10-21 17:30:34 +0530
committerTom Rini <trini@konsulko.com>2015-10-21 09:13:55 -0400
commit673452876fe988048764e3c9fc1c42b9f51d3255 (patch)
tree3cd6cee507c4cbc5f736db315b8de139ca139e75 /include/linux
parente8d124fae0f3dff87348c989aa65ecf9b6eadc14 (diff)
downloadu-boot-673452876fe988048764e3c9fc1c42b9f51d3255.tar.gz
linux/bitops: Move BIT definitions at top
Since it's a copy from Linux, this patch moved all BIT definitions to top so-that it looks same as Linux file. Cc: Tom Rini <trini@konsulko.com> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Signed-off-by: Jagan Teki <jteki@openedev.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bitops.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index 7d30ace41f..e9bb827f42 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -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 */