[U-Boot] [PATCH 1/3] ARM: remove unused bit operations
Daniel Mack
daniel at caiaq.de
Thu Jun 4 12:27:19 CEST 2009
Remove include/asm-arm/bitops.h a bunch of 'external' marked functions
from include/asm-arm/bitops.h. They are not implemented anywhere in the
sources, so this forward declaration is wrong.
Also remove the functions __set_bit, __clear_bit, __change_bit,
__test_and_set_bit, __test_and_clear_bit and __test_and_change_bit.
All these functions can be implemented in a generic fashion which will
be done in the next patch.
Signed-off-by: Daniel Mack <daniel at caiaq.de>
---
include/asm-arm/bitops.h | 70 ----------------------------------------------
1 files changed, 0 insertions(+), 70 deletions(-)
diff --git a/include/asm-arm/bitops.h b/include/asm-arm/bitops.h
index 4b8bab2..3ffd4d5 100644
--- a/include/asm-arm/bitops.h
+++ b/include/asm-arm/bitops.h
@@ -20,76 +20,6 @@
#define smp_mb__before_clear_bit() do { } while (0)
#define smp_mb__after_clear_bit() do { } while (0)
-/*
- * Function prototypes to keep gcc -Wall happy.
- */
-extern void set_bit(int nr, volatile void * addr);
-
-static inline void __set_bit(int nr, volatile void *addr)
-{
- ((unsigned char *) addr)[nr >> 3] |= (1U << (nr & 7));
-}
-
-extern void clear_bit(int nr, volatile void * addr);
-
-static inline void __clear_bit(int nr, volatile void *addr)
-{
- ((unsigned char *) addr)[nr >> 3] &= ~(1U << (nr & 7));
-}
-
-extern void change_bit(int nr, volatile void * addr);
-
-static inline void __change_bit(int nr, volatile void *addr)
-{
- ((unsigned char *) addr)[nr >> 3] ^= (1U << (nr & 7));
-}
-
-extern int test_and_set_bit(int nr, volatile void * addr);
-
-static inline int __test_and_set_bit(int nr, volatile void *addr)
-{
- unsigned int mask = 1 << (nr & 7);
- unsigned int oldval;
-
- oldval = ((unsigned char *) addr)[nr >> 3];
- ((unsigned char *) addr)[nr >> 3] = oldval | mask;
- return oldval & mask;
-}
-
-extern int test_and_clear_bit(int nr, volatile void * addr);
-
-static inline int __test_and_clear_bit(int nr, volatile void *addr)
-{
- unsigned int mask = 1 << (nr & 7);
- unsigned int oldval;
-
- oldval = ((unsigned char *) addr)[nr >> 3];
- ((unsigned char *) addr)[nr >> 3] = oldval & ~mask;
- return oldval & mask;
-}
-
-extern int test_and_change_bit(int nr, volatile void * addr);
-
-static inline int __test_and_change_bit(int nr, volatile void *addr)
-{
- unsigned int mask = 1 << (nr & 7);
- unsigned int oldval;
-
- oldval = ((unsigned char *) addr)[nr >> 3];
- ((unsigned char *) addr)[nr >> 3] = oldval ^ mask;
- return oldval & mask;
-}
-
-extern int find_first_zero_bit(void * addr, unsigned size);
-extern int find_next_zero_bit(void * addr, int size, int offset);
-
-/*
- * This routine doesn't need to be atomic.
- */
-static inline int test_bit(int nr, const void * addr)
-{
- return ((unsigned char *) addr)[nr >> 3] & (1U << (nr & 7));
-}
/*
* ffz = Find First Zero in word. Undefined if no zero exists,
--
1.6.3.1
More information about the U-Boot
mailing list