From 93524205774db78d311d515ed76bead3b52c9ef0 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 15 Mar 2004 15:27:28 -0800 Subject: [PATCH] [PATCH] Export find_next_bit From: Anton Blanchard - export find_next_bit and move the other exports here - fix a few minor style issues --- arch/ppc64/kernel/bitops.c | 20 +++++++++++++------- arch/ppc64/kernel/ppc_ksyms.c | 3 --- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/arch/ppc64/kernel/bitops.c b/arch/ppc64/kernel/bitops.c index 093fe7eff041d..7520d026aee4f 100644 --- a/arch/ppc64/kernel/bitops.c +++ b/arch/ppc64/kernel/bitops.c @@ -3,6 +3,7 @@ */ #include +#include #include #include @@ -44,8 +45,10 @@ found_first: found_middle: return result + ffz(tmp); } +EXPORT_SYMBOL(find_next_zero_bit); -unsigned long find_next_bit(unsigned long *addr, unsigned long size, unsigned long offset) +unsigned long find_next_bit(unsigned long *addr, unsigned long size, + unsigned long offset) { unsigned long *p = addr + (offset >> 6); unsigned long result = offset & ~63UL; @@ -82,8 +85,9 @@ found_first: found_middle: return result + __ffs(tmp); } +EXPORT_SYMBOL(find_next_bit); -static __inline__ unsigned int ext2_ilog2(unsigned int x) +static inline unsigned int ext2_ilog2(unsigned int x) { int lz; @@ -91,16 +95,17 @@ static __inline__ unsigned int ext2_ilog2(unsigned int x) return 31 - lz; } -static __inline__ unsigned int ext2_ffz(unsigned int x) +static inline unsigned int ext2_ffz(unsigned int x) { - u32 tempRC; + u32 rc; if ((x = ~x) == 0) return 32; - tempRC = ext2_ilog2(x & -x); - return tempRC; + rc = ext2_ilog2(x & -x); + return rc; } -unsigned long find_next_zero_le_bit(unsigned long *addr, unsigned long size, unsigned long offset) +unsigned long find_next_zero_le_bit(unsigned long *addr, unsigned long size, + unsigned long offset) { unsigned int *p = ((unsigned int *) addr) + (offset >> 5); unsigned int result = offset & ~31; @@ -136,3 +141,4 @@ found_first: found_middle: return result + ext2_ffz(tmp); } +EXPORT_SYMBOL(find_next_zero_le_bit); diff --git a/arch/ppc64/kernel/ppc_ksyms.c b/arch/ppc64/kernel/ppc_ksyms.c index c43a75d46546f..c294d824ed159 100644 --- a/arch/ppc64/kernel/ppc_ksyms.c +++ b/arch/ppc64/kernel/ppc_ksyms.c @@ -55,9 +55,6 @@ EXPORT_SYMBOL(sys_ioctl); EXPORT_SYMBOL(isa_io_base); EXPORT_SYMBOL(pci_io_base); -EXPORT_SYMBOL(find_next_zero_bit); -EXPORT_SYMBOL(find_next_zero_le_bit); - EXPORT_SYMBOL(strcpy); EXPORT_SYMBOL(strncpy); EXPORT_SYMBOL(strcat); -- 2.53.0