Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

asm-generic: rename generic little-endian bitops functions

As a preparation for providing little-endian bitops for all architectures,
This renames generic implementation of little-endian bitops. (remove
"generic_" prefix and postfix "_le")

s/generic_find_next_le_bit/find_next_bit_le/
s/generic_find_next_zero_le_bit/find_next_zero_bit_le/
s/generic_find_first_zero_le_bit/find_first_zero_bit_le/
s/generic___test_and_set_le_bit/__test_and_set_bit_le/
s/generic___test_and_clear_le_bit/__test_and_clear_bit_le/
s/generic_test_le_bit/test_bit_le/
s/generic___set_le_bit/__set_bit_le/
s/generic___clear_le_bit/__clear_bit_le/
s/generic_test_and_set_le_bit/test_and_set_bit_le/
s/generic_test_and_clear_le_bit/test_and_clear_bit_le/

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Cc: Greg Ungerer <gerg@uclinux.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Akinobu Mita and committed by
Linus Torvalds
c4945b9e 63ab595f

+46 -46
+2 -2
arch/avr32/kernel/avr32_ksyms.c
··· 58 58 EXPORT_SYMBOL(find_next_zero_bit); 59 59 EXPORT_SYMBOL(find_first_bit); 60 60 EXPORT_SYMBOL(find_next_bit); 61 - EXPORT_SYMBOL(generic_find_next_le_bit); 62 - EXPORT_SYMBOL(generic_find_next_zero_le_bit); 61 + EXPORT_SYMBOL(find_next_bit_le); 62 + EXPORT_SYMBOL(find_next_zero_bit_le); 63 63 64 64 /* I/O primitives (lib/io-*.S) */ 65 65 EXPORT_SYMBOL(__raw_readsb);
+2 -2
arch/avr32/lib/findbit.S
··· 123 123 brgt 1b 124 124 retal r11 125 125 126 - ENTRY(generic_find_next_le_bit) 126 + ENTRY(find_next_bit_le) 127 127 lsr r8, r10, 5 128 128 sub r9, r11, r10 129 129 retle r11 ··· 153 153 brgt 1b 154 154 retal r11 155 155 156 - ENTRY(generic_find_next_zero_le_bit) 156 + ENTRY(find_next_zero_bit_le) 157 157 lsr r8, r10, 5 158 158 sub r9, r11, r10 159 159 retle r11
+4 -4
arch/m68k/include/asm/bitops_mm.h
··· 366 366 #define ext2_clear_bit(nr, addr) __test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr)) 367 367 #define ext2_clear_bit_atomic(lock, nr, addr) test_and_clear_bit((nr) ^ 24, (unsigned long *)(addr)) 368 368 #define ext2_find_next_zero_bit(addr, size, offset) \ 369 - generic_find_next_zero_le_bit((unsigned long *)addr, size, offset) 369 + find_next_zero_bit_le((unsigned long *)addr, size, offset) 370 370 #define ext2_find_next_bit(addr, size, offset) \ 371 - generic_find_next_le_bit((unsigned long *)addr, size, offset) 371 + find_next_bit_le((unsigned long *)addr, size, offset) 372 372 373 373 static inline int ext2_test_bit(int nr, const void *vaddr) 374 374 { ··· 398 398 return (p - addr) * 32 + res; 399 399 } 400 400 401 - static inline unsigned long generic_find_next_zero_le_bit(const unsigned long *addr, 401 + static inline unsigned long find_next_zero_bit_le(const unsigned long *addr, 402 402 unsigned long size, unsigned long offset) 403 403 { 404 404 const unsigned long *p = addr + (offset >> 5); ··· 440 440 return (p - addr) * 32 + res; 441 441 } 442 442 443 - static inline unsigned long generic_find_next_le_bit(const unsigned long *addr, 443 + static inline unsigned long find_next_bit_le(const unsigned long *addr, 444 444 unsigned long size, unsigned long offset) 445 445 { 446 446 const unsigned long *p = addr + (offset >> 5);
+1 -1
arch/m68k/include/asm/bitops_no.h
··· 325 325 } 326 326 327 327 #define ext2_find_next_bit(addr, size, off) \ 328 - generic_find_next_le_bit((unsigned long *)(addr), (size), (off)) 328 + find_next_bit_le((unsigned long *)(addr), (size), (off)) 329 329 #include <asm-generic/bitops/minix.h> 330 330 331 331 #endif /* __KERNEL__ */
+8 -7
arch/powerpc/include/asm/bitops.h
··· 303 303 #define __test_and_clear_le_bit(nr, addr) \ 304 304 __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) 305 305 306 - #define find_first_zero_le_bit(addr, size) generic_find_next_zero_le_bit((addr), (size), 0) 307 - unsigned long generic_find_next_zero_le_bit(const unsigned long *addr, 306 + #define find_first_zero_bit_le(addr, size) \ 307 + find_next_zero_bit_le((addr), (size), 0) 308 + unsigned long find_next_zero_bit_le(const unsigned long *addr, 308 309 unsigned long size, unsigned long offset); 309 310 310 - unsigned long generic_find_next_le_bit(const unsigned long *addr, 311 + unsigned long find_next_bit_le(const unsigned long *addr, 311 312 unsigned long size, unsigned long offset); 312 313 /* Bitmap functions for the ext2 filesystem */ 313 314 ··· 325 324 #define ext2_test_bit(nr, addr) test_le_bit((nr),(unsigned long*)addr) 326 325 327 326 #define ext2_find_first_zero_bit(addr, size) \ 328 - find_first_zero_le_bit((unsigned long*)addr, size) 327 + find_first_zero_bit_le((unsigned long*)addr, size) 329 328 #define ext2_find_next_zero_bit(addr, size, off) \ 330 - generic_find_next_zero_le_bit((unsigned long*)addr, size, off) 329 + find_next_zero_bit_le((unsigned long *)addr, size, off) 331 330 332 331 #define ext2_find_next_bit(addr, size, off) \ 333 - generic_find_next_le_bit((unsigned long *)addr, size, off) 332 + find_next_bit_le((unsigned long *)addr, size, off) 334 333 /* Bitmap functions for the minix filesystem. */ 335 334 336 335 #define minix_test_and_set_bit(nr,addr) \ ··· 343 342 test_le_bit(nr, (unsigned long *)addr) 344 343 345 344 #define minix_find_first_zero_bit(addr,size) \ 346 - find_first_zero_le_bit((unsigned long *)addr, size) 345 + find_first_zero_bit_le((unsigned long *)addr, size) 347 346 348 347 #include <asm-generic/bitops/sched.h> 349 348
+6 -6
include/asm-generic/bitops/ext2-non-atomic.h
··· 4 4 #include <asm-generic/bitops/le.h> 5 5 6 6 #define ext2_set_bit(nr,addr) \ 7 - generic___test_and_set_le_bit((nr),(unsigned long *)(addr)) 7 + __test_and_set_bit_le((nr), (unsigned long *)(addr)) 8 8 #define ext2_clear_bit(nr,addr) \ 9 - generic___test_and_clear_le_bit((nr),(unsigned long *)(addr)) 9 + __test_and_clear_bit_le((nr), (unsigned long *)(addr)) 10 10 11 11 #define ext2_test_bit(nr,addr) \ 12 - generic_test_le_bit((nr),(unsigned long *)(addr)) 12 + test_bit_le((nr), (unsigned long *)(addr)) 13 13 #define ext2_find_first_zero_bit(addr, size) \ 14 - generic_find_first_zero_le_bit((unsigned long *)(addr), (size)) 14 + find_first_zero_bit_le((unsigned long *)(addr), (size)) 15 15 #define ext2_find_next_zero_bit(addr, size, off) \ 16 - generic_find_next_zero_le_bit((unsigned long *)(addr), (size), (off)) 16 + find_next_zero_bit_le((unsigned long *)(addr), (size), (off)) 17 17 #define ext2_find_next_bit(addr, size, off) \ 18 - generic_find_next_le_bit((unsigned long *)(addr), (size), (off)) 18 + find_next_bit_le((unsigned long *)(addr), (size), (off)) 19 19 20 20 #endif /* _ASM_GENERIC_BITOPS_EXT2_NON_ATOMIC_H_ */
+14 -14
include/asm-generic/bitops/le.h
··· 8 8 9 9 #define BITOP_LE_SWIZZLE 0 10 10 11 - #define generic_find_next_zero_le_bit(addr, size, offset) \ 11 + #define find_next_zero_bit_le(addr, size, offset) \ 12 12 find_next_zero_bit(addr, size, offset) 13 - #define generic_find_next_le_bit(addr, size, offset) \ 13 + #define find_next_bit_le(addr, size, offset) \ 14 14 find_next_bit(addr, size, offset) 15 - #define generic_find_first_zero_le_bit(addr, size) \ 15 + #define find_first_zero_bit_le(addr, size) \ 16 16 find_first_zero_bit(addr, size) 17 17 18 18 #elif defined(__BIG_ENDIAN) 19 19 20 20 #define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7) 21 21 22 - extern unsigned long generic_find_next_zero_le_bit(const unsigned long *addr, 22 + extern unsigned long find_next_zero_bit_le(const unsigned long *addr, 23 23 unsigned long size, unsigned long offset); 24 - extern unsigned long generic_find_next_le_bit(const unsigned long *addr, 24 + extern unsigned long find_next_bit_le(const unsigned long *addr, 25 25 unsigned long size, unsigned long offset); 26 26 27 - #define generic_find_first_zero_le_bit(addr, size) \ 28 - generic_find_next_zero_le_bit((addr), (size), 0) 27 + #define find_first_zero_bit_le(addr, size) \ 28 + find_next_zero_bit_le((addr), (size), 0) 29 29 30 30 #else 31 31 #error "Please fix <asm/byteorder.h>" 32 32 #endif 33 33 34 - #define generic_test_le_bit(nr, addr) \ 34 + #define test_bit_le(nr, addr) \ 35 35 test_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) 36 - #define generic___set_le_bit(nr, addr) \ 36 + #define __set_bit_le(nr, addr) \ 37 37 __set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) 38 - #define generic___clear_le_bit(nr, addr) \ 38 + #define __clear_bit_le(nr, addr) \ 39 39 __clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) 40 40 41 - #define generic_test_and_set_le_bit(nr, addr) \ 41 + #define test_and_set_bit_le(nr, addr) \ 42 42 test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) 43 - #define generic_test_and_clear_le_bit(nr, addr) \ 43 + #define test_and_clear_bit_le(nr, addr) \ 44 44 test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) 45 45 46 - #define generic___test_and_set_le_bit(nr, addr) \ 46 + #define __test_and_set_bit_le(nr, addr) \ 47 47 __test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) 48 - #define generic___test_and_clear_le_bit(nr, addr) \ 48 + #define __test_and_clear_bit_le(nr, addr) \ 49 49 __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) 50 50 51 51 #endif /* _ASM_GENERIC_BITOPS_LE_H_ */
+5 -5
include/asm-generic/bitops/minix-le.h
··· 4 4 #include <asm-generic/bitops/le.h> 5 5 6 6 #define minix_test_and_set_bit(nr,addr) \ 7 - generic___test_and_set_le_bit((nr),(unsigned long *)(addr)) 7 + __test_and_set_bit_le((nr), (unsigned long *)(addr)) 8 8 #define minix_set_bit(nr,addr) \ 9 - generic___set_le_bit((nr),(unsigned long *)(addr)) 9 + __set_bit_le((nr), (unsigned long *)(addr)) 10 10 #define minix_test_and_clear_bit(nr,addr) \ 11 - generic___test_and_clear_le_bit((nr),(unsigned long *)(addr)) 11 + __test_and_clear_bit_le((nr), (unsigned long *)(addr)) 12 12 #define minix_test_bit(nr,addr) \ 13 - generic_test_le_bit((nr),(unsigned long *)(addr)) 13 + test_bit_le((nr), (unsigned long *)(addr)) 14 14 #define minix_find_first_zero_bit(addr,size) \ 15 - generic_find_first_zero_le_bit((unsigned long *)(addr),(size)) 15 + find_first_zero_bit_le((unsigned long *)(addr), (size)) 16 16 17 17 #endif /* _ASM_GENERIC_BITOPS_MINIX_LE_H_ */
+4 -5
lib/find_next_bit.c
··· 185 185 #endif 186 186 } 187 187 188 - unsigned long generic_find_next_zero_le_bit(const unsigned long *addr, unsigned 188 + unsigned long find_next_zero_bit_le(const unsigned long *addr, unsigned 189 189 long size, unsigned long offset) 190 190 { 191 191 const unsigned long *p = addr + BITOP_WORD(offset); ··· 226 226 found_middle_swap: 227 227 return result + ffz(ext2_swab(tmp)); 228 228 } 229 + EXPORT_SYMBOL(find_next_zero_bit_le); 229 230 230 - EXPORT_SYMBOL(generic_find_next_zero_le_bit); 231 - 232 - unsigned long generic_find_next_le_bit(const unsigned long *addr, unsigned 231 + unsigned long find_next_bit_le(const unsigned long *addr, unsigned 233 232 long size, unsigned long offset) 234 233 { 235 234 const unsigned long *p = addr + BITOP_WORD(offset); ··· 270 271 found_middle_swap: 271 272 return result + __ffs(ext2_swab(tmp)); 272 273 } 273 - EXPORT_SYMBOL(generic_find_next_le_bit); 274 + EXPORT_SYMBOL(find_next_bit_le); 274 275 #endif /* __BIG_ENDIAN */