From 49a802c29d808b83e74685bd67a526fe66fc6766 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Wed, 29 Sep 2010 18:08:50 +0900 Subject: [PATCH] --- yaml --- r: 212990 b: refs/heads/master c: 708ff2a0097b02d32d375b66996661f36cd4d6d1 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/tile/include/asm/bitops.h | 1 + trunk/arch/x86/include/asm/bitops.h | 2 ++ trunk/include/asm-generic/bitops/find.h | 25 +++++++++++++++++++++++++ trunk/include/linux/bitops.h | 22 ---------------------- 5 files changed, 29 insertions(+), 23 deletions(-) diff --git a/[refs] b/[refs] index eaf149142544..5375e9e94081 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c24cef0b68a719324c344c1563ef3d750ac6bf0e +refs/heads/master: 708ff2a0097b02d32d375b66996661f36cd4d6d1 diff --git a/trunk/arch/tile/include/asm/bitops.h b/trunk/arch/tile/include/asm/bitops.h index 6832b4be8990..6d4f0ff2c68c 100644 --- a/trunk/arch/tile/include/asm/bitops.h +++ b/trunk/arch/tile/include/asm/bitops.h @@ -120,6 +120,7 @@ static inline unsigned long __arch_hweight64(__u64 w) #include #include +#include #include #include #include diff --git a/trunk/arch/x86/include/asm/bitops.h b/trunk/arch/x86/include/asm/bitops.h index bafd80defa43..903683b07e42 100644 --- a/trunk/arch/x86/include/asm/bitops.h +++ b/trunk/arch/x86/include/asm/bitops.h @@ -440,6 +440,8 @@ static inline int fls(int x) #ifdef __KERNEL__ +#include + #include #define ARCH_HAS_FAST_MULTIPLIER 1 diff --git a/trunk/include/asm-generic/bitops/find.h b/trunk/include/asm-generic/bitops/find.h index 1914e9742512..30afec0db7d7 100644 --- a/trunk/include/asm-generic/bitops/find.h +++ b/trunk/include/asm-generic/bitops/find.h @@ -9,7 +9,32 @@ extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned long size, unsigned long offset); #endif +#ifdef CONFIG_GENERIC_FIND_FIRST_BIT + +/** + * find_first_bit - find the first set bit in a memory region + * @addr: The address to start the search at + * @size: The maximum size to search + * + * Returns the bit number of the first set bit. + */ +extern unsigned long find_first_bit(const unsigned long *addr, + unsigned long size); + +/** + * find_first_zero_bit - find the first cleared bit in a memory region + * @addr: The address to start the search at + * @size: The maximum size to search + * + * Returns the bit number of the first cleared bit. + */ +extern unsigned long find_first_zero_bit(const unsigned long *addr, + unsigned long size); +#else /* CONFIG_GENERIC_FIND_FIRST_BIT */ + #define find_first_bit(addr, size) find_next_bit((addr), (size), 0) #define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0) +#endif /* CONFIG_GENERIC_FIND_FIRST_BIT */ + #endif /*_ASM_GENERIC_BITOPS_FIND_H_ */ diff --git a/trunk/include/linux/bitops.h b/trunk/include/linux/bitops.h index fc68053378ce..adb0f113f571 100644 --- a/trunk/include/linux/bitops.h +++ b/trunk/include/linux/bitops.h @@ -136,28 +136,6 @@ static inline unsigned long __ffs64(u64 word) } #ifdef __KERNEL__ -#ifdef CONFIG_GENERIC_FIND_FIRST_BIT - -/** - * find_first_bit - find the first set bit in a memory region - * @addr: The address to start the search at - * @size: The maximum size to search - * - * Returns the bit number of the first set bit. - */ -extern unsigned long find_first_bit(const unsigned long *addr, - unsigned long size); - -/** - * find_first_zero_bit - find the first cleared bit in a memory region - * @addr: The address to start the search at - * @size: The maximum size to search - * - * Returns the bit number of the first cleared bit. - */ -extern unsigned long find_first_zero_bit(const unsigned long *addr, - unsigned long size); -#endif /* CONFIG_GENERIC_FIND_FIRST_BIT */ #ifdef CONFIG_GENERIC_FIND_LAST_BIT /**