From de4f6e5b41bef50fc981410ae8380f27f4e93bf8 Mon Sep 17 00:00:00 2001 From: Chris Zankel Date: Thu, 31 May 2007 17:47:01 -0700 Subject: [XTENSA] clean-up header files The header files in the asm-xtensa directory are not clean and 'make headers_check' fails. This is a first patch to fix most of the header files. It removes unnecessary include statements and adds some that are required for building the kernel. The linker script required some updates or the linking stage would fail. Signed-off-by: Chris Zankel --- include/asm-xtensa/bitops.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'include/asm-xtensa/bitops.h') diff --git a/include/asm-xtensa/bitops.h b/include/asm-xtensa/bitops.h index 96303dff3ee..1c1e0d933ee 100644 --- a/include/asm-xtensa/bitops.h +++ b/include/asm-xtensa/bitops.h @@ -57,9 +57,6 @@ static inline int __ffs(unsigned long x) return 31 - __cntlz(x & -x); } - -#ifdef __KERNEL__ - /* * ffs: Find first bit set in word. This is defined the same way as * the libc and compiler builtin ffs routines, therefore @@ -97,11 +94,15 @@ static inline int fls (unsigned int x) #include #ifdef __XTENSA_EL__ -# define ext2_set_bit_atomic(lock,nr,addr) test_and_set_bit((nr),(addr)) -# define ext2_clear_bit_atomic(lock,nr,addr) test_and_clear_bit((nr),(addr)) +# define ext2_set_bit_atomic(lock,nr,addr) \ + test_and_set_bit((nr), (unsigned long*)(addr)) +# define ext2_clear_bit_atomic(lock,nr,addr) \ + test_and_clear_bit((nr), (unsigned long*)(addr)) #elif defined(__XTENSA_EB__) -# define ext2_set_bit_atomic(lock,nr,addr) test_and_set_bit((nr) ^ 0x18, (addr)) -# define ext2_clear_bit_atomic(lock,nr,addr) test_and_clear_bit((nr)^0x18,(addr)) +# define ext2_set_bit_atomic(lock,nr,addr) \ + test_and_set_bit((nr) ^ 0x18, (unsigned long*)(addr)) +# define ext2_clear_bit_atomic(lock,nr,addr) \ + test_and_clear_bit((nr) ^ 0x18, (unsigned long*)(addr)) #else # error processor byte order undefined! #endif -- cgit v1.2.3