Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Justin Chen and committed by
Linus Torvalds
d2f11bf7 07a2039b

+15 -14
+15 -14
arch/frv/include/asm/bitops.h
··· 112 112 #define atomic_clear_mask(mask, v) atomic_test_and_ANDNOT_mask((mask), (v)) 113 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 117 volatile unsigned long *ptr = addr; 118 118 unsigned long mask = 1UL << (nr & 31); ··· 120 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 125 volatile unsigned long *ptr = addr; 126 126 unsigned long mask = 1UL << (nr & 31); ··· 128 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 133 volatile unsigned long *ptr = addr; 134 134 unsigned long mask = 1UL << (nr & 31); ··· 136 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 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 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 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 156 volatile unsigned long *a = addr; 157 157 int mask; ··· 161 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 166 volatile unsigned long *a = addr; 167 167 int mask; ··· 171 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 176 volatile unsigned long *a = addr; 177 177 int mask; ··· 181 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 186 volatile unsigned long *a = addr; 187 187 int mask, retval; ··· 193 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 198 volatile unsigned long *a = addr; 199 199 int mask, retval; ··· 205 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 210 volatile unsigned long *a = addr; 211 211 int mask, retval; ··· 220 220 /* 221 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 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 231 int * a = (int *) addr; 231 232 int mask;