* [U-Boot] [PATCH v2 1/2] linux/bitops: Move BIT defination at top
@ 2015-10-21 11:20 Jagan Teki
2015-10-21 11:45 ` Albert ARIBAUD
0 siblings, 1 reply; 2+ messages in thread
From: Jagan Teki @ 2015-10-21 11:20 UTC (permalink / raw)
To: u-boot
Since it's a copy from Linux, this patch moved all
BIT definations to top so-that it looks same as Linux file.
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
---
Changes for v2:
- Added tab space for BIT(nr)
include/linux/bitops.h | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index 7d30ace..e9bb827 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 */
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH v2 1/2] linux/bitops: Move BIT defination at top
2015-10-21 11:20 [U-Boot] [PATCH v2 1/2] linux/bitops: Move BIT defination at top Jagan Teki
@ 2015-10-21 11:45 ` Albert ARIBAUD
0 siblings, 0 replies; 2+ messages in thread
From: Albert ARIBAUD @ 2015-10-21 11:45 UTC (permalink / raw)
To: u-boot
Hello Jagan,
Typo in subject / commit summary: defination -> definition.
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-21 11:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-21 11:20 [U-Boot] [PATCH v2 1/2] linux/bitops: Move BIT defination at top Jagan Teki
2015-10-21 11:45 ` Albert ARIBAUD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox