Message ID | 1445428834-11427-1-git-send-email-jteki@openedev.com |
---|---|
State | Accepted |
Delegated to: | Tom Rini |
Headers | show |
On Wed, Oct 21, 2015 at 05:30:34PM +0530, Jagan Teki wrote: > 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> Applied to u-boot/master, thanks!
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 */
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> --- Changes for v3: - Fix typo defination -> definition. - Used definitions instead of definition as more BIT definitions are moved Changes for v2: - Added tab space for BIT(nr) include/linux/bitops.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)