diff options
author | Justin Chen <jchen@hpdst41.cup.hp.com> | 2009-06-11 08:04:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-11 12:01:26 -0400 |
commit | d2f11bf7fc630e27dfcede367399dddf40521878 (patch) | |
tree | c1bd9e1551d93262398286428dd5face41bd3f39 | |
parent | 07a2039b8eb0af4ff464efd3dfd95de5c02648c6 (diff) |
FRV: bitops: Change the bitmap index from int to unsigned long
Change the index to unsigned long in all bitops for [frv]
Signed-off-by: Justin Chen <justin.chen@hp.com>
Reviewed-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/frv/include/asm/bitops.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/arch/frv/include/asm/bitops.h b/arch/frv/include/asm/bitops.h index 287f6f697ce2..50ae91b29674 100644 --- a/arch/frv/include/asm/bitops.h +++ b/arch/frv/include/asm/bitops.h | |||
@@ -112,7 +112,7 @@ extern unsigned long atomic_test_and_XOR_mask(unsigned long mask, volatile unsig | |||
112 | #define atomic_clear_mask(mask, v) atomic_test_and_ANDNOT_mask((mask), (v)) | 112 | #define atomic_clear_mask(mask, v) atomic_test_and_ANDNOT_mask((mask), (v)) |
113 | #define atomic_set_mask(mask, v) atomic_test_and_OR_mask((mask), (v)) | 113 | #define atomic_set_mask(mask, v) atomic_test_and_OR_mask((mask), (v)) |
114 | 114 | ||
115 | static inline int test_and_clear_bit(int nr, volatile void *addr) | 115 | static inline int test_and_clear_bit(unsigned long nr, volatile void *addr) |
116 | { | 116 | { |
117 | volatile unsigned long *ptr = addr; | 117 | volatile unsigned long *ptr = addr; |
118 | unsigned long mask = 1UL << (nr & 31); | 118 | unsigned long mask = 1UL << (nr & 31); |
@@ -120,7 +120,7 @@ static inline int test_and_clear_bit(int nr, volatile void *addr) | |||
120 | return (atomic_test_and_ANDNOT_mask(mask, ptr) & mask) != 0; | 120 | return (atomic_test_and_ANDNOT_mask(mask, ptr) & mask) != 0; |
121 | } | 121 | } |
122 | 122 | ||
123 | static inline int test_and_set_bit(int nr, volatile void *addr) | 123 | static inline int test_and_set_bit(unsigned long nr, volatile void *addr) |
124 | { | 124 | { |
125 | volatile unsigned long *ptr = addr; | 125 | volatile unsigned long *ptr = addr; |
126 | unsigned long mask = 1UL << (nr & 31); | 126 | unsigned long mask = 1UL << (nr & 31); |
@@ -128,7 +128,7 @@ static inline int test_and_set_bit(int nr, volatile void *addr) | |||
128 | return (atomic_test_and_OR_mask(mask, ptr) & mask) != 0; | 128 | return (atomic_test_and_OR_mask(mask, ptr) & mask) != 0; |
129 | } | 129 | } |
130 | 130 | ||
131 | static inline int test_and_change_bit(int nr, volatile void *addr) | 131 | static inline int test_and_change_bit(unsigned long nr, volatile void *addr) |
132 | { | 132 | { |
133 | volatile unsigned long *ptr = addr; | 133 | volatile unsigned long *ptr = addr; |
134 | unsigned long mask = 1UL << (nr & 31); | 134 | unsigned long mask = 1UL << (nr & 31); |
@@ -136,22 +136,22 @@ static inline int test_and_change_bit(int nr, volatile void *addr) | |||
136 | return (atomic_test_and_XOR_mask(mask, ptr) & mask) != 0; | 136 | return (atomic_test_and_XOR_mask(mask, ptr) & mask) != 0; |
137 | } | 137 | } |
138 | 138 | ||
139 | static inline void clear_bit(int nr, volatile void *addr) | 139 | static inline void clear_bit(unsigned long nr, volatile void *addr) |
140 | { | 140 | { |
141 | test_and_clear_bit(nr, addr); | 141 | test_and_clear_bit(nr, addr); |
142 | } | 142 | } |
143 | 143 | ||
144 | static inline void set_bit(int nr, volatile void *addr) | 144 | static inline void set_bit(unsigned long nr, volatile void *addr) |
145 | { | 145 | { |
146 | test_and_set_bit(nr, addr); | 146 | test_and_set_bit(nr, addr); |
147 | } | 147 | } |
148 | 148 | ||
149 | static inline void change_bit(int nr, volatile void * addr) | 149 | static inline void change_bit(unsigned long nr, volatile void *addr) |
150 | { | 150 | { |
151 | test_and_change_bit(nr, addr); | 151 | test_and_change_bit(nr, addr); |
152 | } | 152 | } |
153 | 153 | ||
154 | static inline void __clear_bit(int nr, volatile void * addr) | 154 | static inline void __clear_bit(unsigned long nr, volatile void *addr) |
155 | { | 155 | { |
156 | volatile unsigned long *a = addr; | 156 | volatile unsigned long *a = addr; |
157 | int mask; | 157 | int mask; |
@@ -161,7 +161,7 @@ static inline void __clear_bit(int nr, volatile void * addr) | |||
161 | *a &= ~mask; | 161 | *a &= ~mask; |
162 | } | 162 | } |
163 | 163 | ||
164 | static inline void __set_bit(int nr, volatile void * addr) | 164 | static inline void __set_bit(unsigned long nr, volatile void *addr) |
165 | { | 165 | { |
166 | volatile unsigned long *a = addr; | 166 | volatile unsigned long *a = addr; |
167 | int mask; | 167 | int mask; |
@@ -171,7 +171,7 @@ static inline void __set_bit(int nr, volatile void * addr) | |||
171 | *a |= mask; | 171 | *a |= mask; |
172 | } | 172 | } |
173 | 173 | ||
174 | static inline void __change_bit(int nr, volatile void *addr) | 174 | static inline void __change_bit(unsigned long nr, volatile void *addr) |
175 | { | 175 | { |
176 | volatile unsigned long *a = addr; | 176 | volatile unsigned long *a = addr; |
177 | int mask; | 177 | int mask; |
@@ -181,7 +181,7 @@ static inline void __change_bit(int nr, volatile void *addr) | |||
181 | *a ^= mask; | 181 | *a ^= mask; |
182 | } | 182 | } |
183 | 183 | ||
184 | static inline int __test_and_clear_bit(int nr, volatile void * addr) | 184 | static inline int __test_and_clear_bit(unsigned long nr, volatile void *addr) |
185 | { | 185 | { |
186 | volatile unsigned long *a = addr; | 186 | volatile unsigned long *a = addr; |
187 | int mask, retval; | 187 | int mask, retval; |
@@ -193,7 +193,7 @@ static inline int __test_and_clear_bit(int nr, volatile void * addr) | |||
193 | return retval; | 193 | return retval; |
194 | } | 194 | } |
195 | 195 | ||
196 | static inline int __test_and_set_bit(int nr, volatile void * addr) | 196 | static inline int __test_and_set_bit(unsigned long nr, volatile void *addr) |
197 | { | 197 | { |
198 | volatile unsigned long *a = addr; | 198 | volatile unsigned long *a = addr; |
199 | int mask, retval; | 199 | int mask, retval; |
@@ -205,7 +205,7 @@ static inline int __test_and_set_bit(int nr, volatile void * addr) | |||
205 | return retval; | 205 | return retval; |
206 | } | 206 | } |
207 | 207 | ||
208 | static inline int __test_and_change_bit(int nr, volatile void * addr) | 208 | static inline int __test_and_change_bit(unsigned long nr, volatile void *addr) |
209 | { | 209 | { |
210 | volatile unsigned long *a = addr; | 210 | volatile unsigned long *a = addr; |
211 | int mask, retval; | 211 | int mask, retval; |
@@ -220,12 +220,13 @@ static inline int __test_and_change_bit(int nr, volatile void * addr) | |||
220 | /* | 220 | /* |
221 | * This routine doesn't need to be atomic. | 221 | * This routine doesn't need to be atomic. |
222 | */ | 222 | */ |
223 | static inline int __constant_test_bit(int nr, const volatile void * addr) | 223 | static inline int |
224 | __constant_test_bit(unsigned long nr, const volatile void *addr) | ||
224 | { | 225 | { |
225 | return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; | 226 | return ((1UL << (nr & 31)) & (((const volatile unsigned int *) addr)[nr >> 5])) != 0; |
226 | } | 227 | } |
227 | 228 | ||
228 | static inline int __test_bit(int nr, const volatile void * addr) | 229 | static inline int __test_bit(unsigned long nr, const volatile void *addr) |
229 | { | 230 | { |
230 | int * a = (int *) addr; | 231 | int * a = (int *) addr; |
231 | int mask; | 232 | int mask; |