diff options
Diffstat (limited to 'arch/mn10300/include/asm/bitops.h')
-rw-r--r-- | arch/mn10300/include/asm/bitops.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/mn10300/include/asm/bitops.h b/arch/mn10300/include/asm/bitops.h index f49ac49e09ad..3b8a868188f5 100644 --- a/arch/mn10300/include/asm/bitops.h +++ b/arch/mn10300/include/asm/bitops.h | |||
@@ -57,7 +57,7 @@ | |||
57 | #define clear_bit(nr, addr) ___clear_bit((nr), (addr)) | 57 | #define clear_bit(nr, addr) ___clear_bit((nr), (addr)) |
58 | 58 | ||
59 | 59 | ||
60 | static inline void __clear_bit(int nr, volatile void *addr) | 60 | static inline void __clear_bit(unsigned long nr, volatile void *addr) |
61 | { | 61 | { |
62 | unsigned int *a = (unsigned int *) addr; | 62 | unsigned int *a = (unsigned int *) addr; |
63 | int mask; | 63 | int mask; |
@@ -70,15 +70,15 @@ static inline void __clear_bit(int nr, volatile void *addr) | |||
70 | /* | 70 | /* |
71 | * test bit | 71 | * test bit |
72 | */ | 72 | */ |
73 | static inline int test_bit(int nr, const volatile void *addr) | 73 | static inline int test_bit(unsigned long nr, const volatile void *addr) |
74 | { | 74 | { |
75 | return 1UL & (((const unsigned int *) addr)[nr >> 5] >> (nr & 31)); | 75 | return 1UL & (((const volatile unsigned int *) addr)[nr >> 5] >> (nr & 31)); |
76 | } | 76 | } |
77 | 77 | ||
78 | /* | 78 | /* |
79 | * change bit | 79 | * change bit |
80 | */ | 80 | */ |
81 | static inline void __change_bit(int nr, volatile void *addr) | 81 | static inline void __change_bit(unsigned long nr, volatile void *addr) |
82 | { | 82 | { |
83 | int mask; | 83 | int mask; |
84 | unsigned int *a = (unsigned int *) addr; | 84 | unsigned int *a = (unsigned int *) addr; |
@@ -88,7 +88,7 @@ static inline void __change_bit(int nr, volatile void *addr) | |||
88 | *a ^= mask; | 88 | *a ^= mask; |
89 | } | 89 | } |
90 | 90 | ||
91 | extern void change_bit(int nr, volatile void *addr); | 91 | extern void change_bit(unsigned long nr, volatile void *addr); |
92 | 92 | ||
93 | /* | 93 | /* |
94 | * test and set bit | 94 | * test and set bit |
@@ -135,7 +135,7 @@ extern void change_bit(int nr, volatile void *addr); | |||
135 | /* | 135 | /* |
136 | * test and change bit | 136 | * test and change bit |
137 | */ | 137 | */ |
138 | static inline int __test_and_change_bit(int nr, volatile void *addr) | 138 | static inline int __test_and_change_bit(unsigned long nr, volatile void *addr) |
139 | { | 139 | { |
140 | int mask, retval; | 140 | int mask, retval; |
141 | unsigned int *a = (unsigned int *)addr; | 141 | unsigned int *a = (unsigned int *)addr; |
@@ -148,7 +148,7 @@ static inline int __test_and_change_bit(int nr, volatile void *addr) | |||
148 | return retval; | 148 | return retval; |
149 | } | 149 | } |
150 | 150 | ||
151 | extern int test_and_change_bit(int nr, volatile void *addr); | 151 | extern int test_and_change_bit(unsigned long nr, volatile void *addr); |
152 | 152 | ||
153 | #include <asm-generic/bitops/lock.h> | 153 | #include <asm-generic/bitops/lock.h> |
154 | 154 | ||
@@ -229,9 +229,9 @@ int ffs(int x) | |||
229 | #include <asm-generic/bitops/hweight.h> | 229 | #include <asm-generic/bitops/hweight.h> |
230 | 230 | ||
231 | #define ext2_set_bit_atomic(lock, nr, addr) \ | 231 | #define ext2_set_bit_atomic(lock, nr, addr) \ |
232 | test_and_set_bit((nr) ^ 0x18, (addr)) | 232 | test_and_set_bit((nr), (addr)) |
233 | #define ext2_clear_bit_atomic(lock, nr, addr) \ | 233 | #define ext2_clear_bit_atomic(lock, nr, addr) \ |
234 | test_and_clear_bit((nr) ^ 0x18, (addr)) | 234 | test_and_clear_bit((nr), (addr)) |
235 | 235 | ||
236 | #include <asm-generic/bitops/ext2-non-atomic.h> | 236 | #include <asm-generic/bitops/ext2-non-atomic.h> |
237 | #include <asm-generic/bitops/minix-le.h> | 237 | #include <asm-generic/bitops/minix-le.h> |