aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Chen <jchen@hpdst41.cup.hp.com>2010-10-27 12:28:34 -0400
committerDavid Howells <dhowells@redhat.com>2010-10-27 12:28:34 -0400
commite4acfcac0f3e3b575bb1819052b91b579988c59b (patch)
treede267f238ac2847483224b859fe013ca40eb6d6c
parent292aa141277b142148d15bf28104f8890616e291 (diff)
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>
-rw-r--r--arch/mn10300/include/asm/bitops.h12
-rw-r--r--arch/mn10300/lib/bitops.c4
2 files changed, 8 insertions, 8 deletions
diff --git a/arch/mn10300/include/asm/bitops.h b/arch/mn10300/include/asm/bitops.h
index 3f50e9661076..6208ea60458e 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
60static inline void __clear_bit(int nr, volatile void *addr) 60static 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,7 +70,7 @@ static inline void __clear_bit(int nr, volatile void *addr)
70/* 70/*
71 * test bit 71 * test bit
72 */ 72 */
73static inline int test_bit(int nr, const volatile void *addr) 73static 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 unsigned int *) addr)[nr >> 5] >> (nr & 31));
76} 76}
@@ -78,7 +78,7 @@ static inline int test_bit(int nr, const volatile void *addr)
78/* 78/*
79 * change bit 79 * change bit
80 */ 80 */
81static inline void __change_bit(int nr, volatile void *addr) 81static 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
91extern void change_bit(int nr, volatile void *addr); 91extern 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 */
138static inline int __test_and_change_bit(int nr, volatile void *addr) 138static 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
151extern int test_and_change_bit(int nr, volatile void *addr); 151extern 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
diff --git a/arch/mn10300/lib/bitops.c b/arch/mn10300/lib/bitops.c
index 440a7dcbf87b..a66c6cdaf442 100644
--- a/arch/mn10300/lib/bitops.c
+++ b/arch/mn10300/lib/bitops.c
@@ -15,7 +15,7 @@
15/* 15/*
16 * try flipping a bit using BSET and BCLR 16 * try flipping a bit using BSET and BCLR
17 */ 17 */
18void change_bit(int nr, volatile void *addr) 18void change_bit(unsigned long nr, volatile void *addr)
19{ 19{
20 if (test_bit(nr, addr)) 20 if (test_bit(nr, addr))
21 goto try_clear_bit; 21 goto try_clear_bit;
@@ -34,7 +34,7 @@ try_clear_bit:
34/* 34/*
35 * try flipping a bit using BSET and BCLR and returning the old value 35 * try flipping a bit using BSET and BCLR and returning the old value
36 */ 36 */
37int test_and_change_bit(int nr, volatile void *addr) 37int test_and_change_bit(unsigned long nr, volatile void *addr)
38{ 38{
39 if (test_bit(nr, addr)) 39 if (test_bit(nr, addr))
40 goto try_clear_bit; 40 goto try_clear_bit;