Commit e4acfcac0f3e3b575bb1819052b91b579988c59b

Authored by Justin Chen
Committed by David Howells
1 parent 292aa14127

bitops: Change the bitmap index from int to unsigned long [mn10300]

Change the index to unsigned long in all bitops for [mn10300]

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>

Showing 2 changed files with 8 additions and 8 deletions Side-by-side Diff

arch/mn10300/include/asm/bitops.h
... ... @@ -57,7 +57,7 @@
57 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 62 unsigned int *a = (unsigned int *) addr;
63 63 int mask;
... ... @@ -70,7 +70,7 @@
70 70 /*
71 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 75 return 1UL & (((const unsigned int *) addr)[nr >> 5] >> (nr & 31));
76 76 }
... ... @@ -78,7 +78,7 @@
78 78 /*
79 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 83 int mask;
84 84 unsigned int *a = (unsigned int *) addr;
... ... @@ -88,7 +88,7 @@
88 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 94 * test and set bit
... ... @@ -135,7 +135,7 @@
135 135 /*
136 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 140 int mask, retval;
141 141 unsigned int *a = (unsigned int *)addr;
... ... @@ -148,7 +148,7 @@
148 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 153 #include <asm-generic/bitops/lock.h>
154 154  
arch/mn10300/lib/bitops.c
... ... @@ -15,7 +15,7 @@
15 15 /*
16 16 * try flipping a bit using BSET and BCLR
17 17 */
18   -void change_bit(int nr, volatile void *addr)
  18 +void change_bit(unsigned long nr, volatile void *addr)
19 19 {
20 20 if (test_bit(nr, addr))
21 21 goto try_clear_bit;
... ... @@ -34,7 +34,7 @@
34 34 /*
35 35 * try flipping a bit using BSET and BCLR and returning the old value
36 36 */
37   -int test_and_change_bit(int nr, volatile void *addr)
  37 +int test_and_change_bit(unsigned long nr, volatile void *addr)
38 38 {
39 39 if (test_bit(nr, addr))
40 40 goto try_clear_bit;