From 83d99df7c4bf37176d8c7b199e3b129a51fa04c8 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Thu, 15 Dec 2011 14:55:53 -0800 Subject: [PATCH] x86, bitops: Move fls64.h inside __KERNEL__ We would include even without __KERNEL__, but that doesn't make sense, as: 1. That file provides fls64(), but the corresponding function fls() is not exported to user space. 2. The implementation of fls64.h uses kernel-only symbols. 3. fls64.h is not exported to user space. This appears to have been a bug introduced in checkin: d57594c203b1 bitops: use __fls for fls64 on 64-bit archs Cc: Stephen Hemminger Cc: Alexander van Heukelum Cc: David Howells Signed-off-by: H. Peter Anvin Link: http://lkml.kernel.org/r/4EEA77E1.6050009@zytor.com --- arch/x86/include/asm/bitops.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h index 1775d6e5920e..4a6235b053cb 100644 --- a/arch/x86/include/asm/bitops.h +++ b/arch/x86/include/asm/bitops.h @@ -380,6 +380,8 @@ static inline unsigned long __fls(unsigned long word) return word; } +#undef ADDR + #ifdef __KERNEL__ /** * ffs - find first set bit in word @@ -434,11 +436,6 @@ static inline int fls(int x) #endif return r + 1; } -#endif /* __KERNEL__ */ - -#undef ADDR - -#ifdef __KERNEL__ #include @@ -450,12 +447,8 @@ static inline int fls(int x) #include -#endif /* __KERNEL__ */ - #include -#ifdef __KERNEL__ - #include #include -- 2.34.1