提交 04b18ff9 编写于 作者: A Akinobu Mita 提交者: Linus Torvalds

arm: use asm-generic/bitops/le.h

The previous style change enables to use asm-generic/bitops/le.h on arm.
Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 63e424c8
...@@ -203,8 +203,6 @@ extern int _find_next_bit_be(const unsigned long *p, int size, int offset); ...@@ -203,8 +203,6 @@ extern int _find_next_bit_be(const unsigned long *p, int size, int offset);
#define find_first_bit(p,sz) _find_first_bit_le(p,sz) #define find_first_bit(p,sz) _find_first_bit_le(p,sz)
#define find_next_bit(p,sz,off) _find_next_bit_le(p,sz,off) #define find_next_bit(p,sz,off) _find_next_bit_le(p,sz,off)
#define WORD_BITOFF_TO_LE(x) ((x))
#else #else
/* /*
* These are the big endian, atomic definitions. * These are the big endian, atomic definitions.
...@@ -214,8 +212,6 @@ extern int _find_next_bit_be(const unsigned long *p, int size, int offset); ...@@ -214,8 +212,6 @@ extern int _find_next_bit_be(const unsigned long *p, int size, int offset);
#define find_first_bit(p,sz) _find_first_bit_be(p,sz) #define find_first_bit(p,sz) _find_first_bit_be(p,sz)
#define find_next_bit(p,sz,off) _find_next_bit_be(p,sz,off) #define find_next_bit(p,sz,off) _find_next_bit_be(p,sz,off)
#define WORD_BITOFF_TO_LE(x) ((x) ^ 0x18)
#endif #endif
#if __LINUX_ARM_ARCH__ < 5 #if __LINUX_ARM_ARCH__ < 5
...@@ -287,40 +283,7 @@ static inline int fls(int x) ...@@ -287,40 +283,7 @@ static inline int fls(int x)
#include <asm-generic/bitops/hweight.h> #include <asm-generic/bitops/hweight.h>
#include <asm-generic/bitops/lock.h> #include <asm-generic/bitops/lock.h>
static inline void __set_bit_le(int nr, void *addr) #ifdef __ARMEB__
{
__set_bit(WORD_BITOFF_TO_LE(nr), addr);
}
static inline void __clear_bit_le(int nr, void *addr)
{
__clear_bit(WORD_BITOFF_TO_LE(nr), addr);
}
static inline int __test_and_set_bit_le(int nr, void *addr)
{
return __test_and_set_bit(WORD_BITOFF_TO_LE(nr), addr);
}
static inline int test_and_set_bit_le(int nr, void *addr)
{
return test_and_set_bit(WORD_BITOFF_TO_LE(nr), addr);
}
static inline int __test_and_clear_bit_le(int nr, void *addr)
{
return __test_and_clear_bit(WORD_BITOFF_TO_LE(nr), addr);
}
static inline int test_and_clear_bit_le(int nr, void *addr)
{
return test_and_clear_bit(WORD_BITOFF_TO_LE(nr), addr);
}
static inline int test_bit_le(int nr, const void *addr)
{
return test_bit(WORD_BITOFF_TO_LE(nr), addr);
}
static inline int find_first_zero_bit_le(const void *p, unsigned size) static inline int find_first_zero_bit_le(const void *p, unsigned size)
{ {
...@@ -340,6 +303,10 @@ static inline int find_next_bit_le(const void *p, int size, int offset) ...@@ -340,6 +303,10 @@ static inline int find_next_bit_le(const void *p, int size, int offset)
} }
#define find_next_bit_le find_next_bit_le #define find_next_bit_le find_next_bit_le
#endif
#include <asm-generic/bitops/le.h>
/* /*
* Ext2 is defined to use little-endian byte ordering. * Ext2 is defined to use little-endian byte ordering.
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册