From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jagan Teki Date: Wed, 21 Oct 2015 16:46:50 +0530 Subject: [U-Boot] [PATCH 1/2] linux/bitops: Move BIT defination at top Message-ID: <1445426211-10135-1-git-send-email-jteki@openedev.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Signed-off-by: Jagan Teki --- include/linux/bitops.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 7d30ace..8ed0cf5 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -4,6 +4,8 @@ #include #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 */ -- 1.9.1