bitops: make asm-generic/bitops/find.h more generic
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 29 Sep 2010 09:08:50 +0000 (18:08 +0900)
committerArnd Bergmann <arnd@arndb.de>
Sat, 9 Oct 2010 19:51:44 +0000 (21:51 +0200)
commit708ff2a0097b02d32d375b66996661f36cd4d6d1
tree66f7922a1e35de1ad15ba84849bd6fc602c26087
parentc24cef0b68a719324c344c1563ef3d750ac6bf0e
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>
arch/tile/include/asm/bitops.h
arch/x86/include/asm/bitops.h
include/asm-generic/bitops/find.h
include/linux/bitops.h