aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2011-03-23 19:41:47 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-23 22:46:11 -0400
commitc4945b9ed472e8796e352f10df9dbc2841ba7b61 (patch)
tree6e2fa896f3a153d3bb16e7a07c87620cabf1ebd6 /include/asm-generic
parent63ab595fb6b34234f116f05f95dc752dd5f8affb (diff)
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>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/bitops/ext2-non-atomic.h12
-rw-r--r--include/asm-generic/bitops/le.h28
-rw-r--r--include/asm-generic/bitops/minix-le.h10
3 files changed, 25 insertions, 25 deletions
diff --git a/include/asm-generic/bitops/ext2-non-atomic.h b/include/asm-generic/bitops/ext2-non-atomic.h
index 63cf822431a2..ba27bbe755a2 100644
--- a/include/asm-generic/bitops/ext2-non-atomic.h
+++ b/include/asm-generic/bitops/ext2-non-atomic.h
@@ -4,17 +4,17 @@
4#include <asm-generic/bitops/le.h> 4#include <asm-generic/bitops/le.h>
5 5
6#define ext2_set_bit(nr,addr) \ 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#define ext2_clear_bit(nr,addr) \ 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#define ext2_test_bit(nr,addr) \ 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#define ext2_find_first_zero_bit(addr, size) \ 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#define ext2_find_next_zero_bit(addr, size, off) \ 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#define ext2_find_next_bit(addr, size, off) \ 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#endif /* _ASM_GENERIC_BITOPS_EXT2_NON_ATOMIC_H_ */ 20#endif /* _ASM_GENERIC_BITOPS_EXT2_NON_ATOMIC_H_ */
diff --git a/include/asm-generic/bitops/le.h b/include/asm-generic/bitops/le.h
index 9085429ff3ca..394ac3ebcbde 100644
--- a/include/asm-generic/bitops/le.h
+++ b/include/asm-generic/bitops/le.h
@@ -8,44 +8,44 @@
8 8
9#define BITOP_LE_SWIZZLE 0 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 find_next_zero_bit(addr, size, offset) 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 find_next_bit(addr, size, offset) 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 find_first_zero_bit(addr, size) 16 find_first_zero_bit(addr, size)
17 17
18#elif defined(__BIG_ENDIAN) 18#elif defined(__BIG_ENDIAN)
19 19
20#define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7) 20#define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7)
21 21
22extern unsigned long generic_find_next_zero_le_bit(const unsigned long *addr, 22extern unsigned long find_next_zero_bit_le(const unsigned long *addr,
23 unsigned long size, unsigned long offset); 23 unsigned long size, unsigned long offset);
24extern unsigned long generic_find_next_le_bit(const unsigned long *addr, 24extern unsigned long find_next_bit_le(const unsigned long *addr,
25 unsigned long size, unsigned long offset); 25 unsigned long size, unsigned long offset);
26 26
27#define generic_find_first_zero_le_bit(addr, size) \ 27#define find_first_zero_bit_le(addr, size) \
28 generic_find_next_zero_le_bit((addr), (size), 0) 28 find_next_zero_bit_le((addr), (size), 0)
29 29
30#else 30#else
31#error "Please fix <asm/byteorder.h>" 31#error "Please fix <asm/byteorder.h>"
32#endif 32#endif
33 33
34#define generic_test_le_bit(nr, addr) \ 34#define test_bit_le(nr, addr) \
35 test_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) 35 test_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
36#define generic___set_le_bit(nr, addr) \ 36#define __set_bit_le(nr, addr) \
37 __set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) 37 __set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
38#define generic___clear_le_bit(nr, addr) \ 38#define __clear_bit_le(nr, addr) \
39 __clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) 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 test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) 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 test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) 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 __test_and_set_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) 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 __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr)) 49 __test_and_clear_bit((nr) ^ BITOP_LE_SWIZZLE, (addr))
50 50
51#endif /* _ASM_GENERIC_BITOPS_LE_H_ */ 51#endif /* _ASM_GENERIC_BITOPS_LE_H_ */
diff --git a/include/asm-generic/bitops/minix-le.h b/include/asm-generic/bitops/minix-le.h
index 4a981c1bb1ae..854e9489f62d 100644
--- a/include/asm-generic/bitops/minix-le.h
+++ b/include/asm-generic/bitops/minix-le.h
@@ -4,14 +4,14 @@
4#include <asm-generic/bitops/le.h> 4#include <asm-generic/bitops/le.h>
5 5
6#define minix_test_and_set_bit(nr,addr) \ 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#define minix_set_bit(nr,addr) \ 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#define minix_test_and_clear_bit(nr,addr) \ 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#define minix_test_bit(nr,addr) \ 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#define minix_find_first_zero_bit(addr,size) \ 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#endif /* _ASM_GENERIC_BITOPS_MINIX_LE_H_ */ 17#endif /* _ASM_GENERIC_BITOPS_MINIX_LE_H_ */