From: Jagan Teki Date: Wed, 21 Oct 2015 12:00:34 +0000 (+0530) Subject: linux/bitops: Move BIT definitions at top X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=673452876fe988048764e3c9fc1c42b9f51d3255;p=u-boot.git 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 Cc: Albert ARIBAUD Signed-off-by: Jagan Teki --- 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 -#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 /* linux/include/asm-generic/bitops/non-atomic.h */