aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bitops.h
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2010-09-29 05:08:50 -0400
committerArnd Bergmann <arnd@arndb.de>2010-10-09 15:51:44 -0400
commit708ff2a0097b02d32d375b66996661f36cd4d6d1 (patch)
tree66f7922a1e35de1ad15ba84849bd6fc602c26087 /include/linux/bitops.h
parentc24cef0b68a719324c344c1563ef3d750ac6bf0e (diff)
bitops: make asm-generic/bitops/find.h more generic
asm-generic/bitops/find.h has the extern declarations of find_next_bit() and find_next_zero_bit() and the macro definitions of find_first_bit() and find_first_zero_bit(). It is only usable by the architectures which enables CONFIG_GENERIC_FIND_NEXT_BIT and disables CONFIG_GENERIC_FIND_FIRST_BIT. x86 and tile enable both CONFIG_GENERIC_FIND_NEXT_BIT and CONFIG_GENERIC_FIND_FIRST_BIT. These architectures cannot include asm-generic/bitops/find.h in their asm/bitops.h. So ifdefed extern declarations of find_first_bit and find_first_zero_bit() are put in linux/bitops.h. This makes asm-generic/bitops/find.h usable by these architectures and use it. Also this change is needed for the forthcoming duplicated extern declarations cleanup. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: x86@kernel.org Cc: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'include/linux/bitops.h')
-rw-r--r--include/linux/bitops.h22
1 files changed, 0 insertions, 22 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index fc68053378ce..adb0f113f571 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -136,28 +136,6 @@ static inline unsigned long __ffs64(u64 word)
136} 136}
137 137
138#ifdef __KERNEL__ 138#ifdef __KERNEL__
139#ifdef CONFIG_GENERIC_FIND_FIRST_BIT
140
141/**
142 * find_first_bit - find the first set bit in a memory region
143 * @addr: The address to start the search at
144 * @size: The maximum size to search
145 *
146 * Returns the bit number of the first set bit.
147 */
148extern unsigned long find_first_bit(const unsigned long *addr,
149 unsigned long size);
150
151/**
152 * find_first_zero_bit - find the first cleared bit in a memory region
153 * @addr: The address to start the search at
154 * @size: The maximum size to search
155 *
156 * Returns the bit number of the first cleared bit.
157 */
158extern unsigned long find_first_zero_bit(const unsigned long *addr,
159 unsigned long size);
160#endif /* CONFIG_GENERIC_FIND_FIRST_BIT */
161 139
162#ifdef CONFIG_GENERIC_FIND_LAST_BIT 140#ifdef CONFIG_GENERIC_FIND_LAST_BIT
163/** 141/**