Skip to content

Commit

Permalink
bitops: Change the bitmap index from int to unsigned long [mn10300]
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Justin Chen authored and David Howells committed Oct 27, 2010
1 parent 292aa14 commit e4acfca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions arch/mn10300/include/asm/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#define clear_bit(nr, addr) ___clear_bit((nr), (addr))


static inline void __clear_bit(int nr, volatile void *addr)
static inline void __clear_bit(unsigned long nr, volatile void *addr)
{
unsigned int *a = (unsigned int *) addr;
int mask;
Expand All @@ -70,15 +70,15 @@ static inline void __clear_bit(int nr, volatile void *addr)
/*
* test bit
*/
static inline int test_bit(int nr, const volatile void *addr)
static inline int test_bit(unsigned long nr, const volatile void *addr)
{
return 1UL & (((const unsigned int *) addr)[nr >> 5] >> (nr & 31));
}

/*
* change bit
*/
static inline void __change_bit(int nr, volatile void *addr)
static inline void __change_bit(unsigned long nr, volatile void *addr)
{
int mask;
unsigned int *a = (unsigned int *) addr;
Expand All @@ -88,7 +88,7 @@ static inline void __change_bit(int nr, volatile void *addr)
*a ^= mask;
}

extern void change_bit(int nr, volatile void *addr);
extern void change_bit(unsigned long nr, volatile void *addr);

/*
* test and set bit
Expand Down Expand Up @@ -135,7 +135,7 @@ extern void change_bit(int nr, volatile void *addr);
/*
* test and change bit
*/
static inline int __test_and_change_bit(int nr, volatile void *addr)
static inline int __test_and_change_bit(unsigned long nr, volatile void *addr)
{
int mask, retval;
unsigned int *a = (unsigned int *)addr;
Expand All @@ -148,7 +148,7 @@ static inline int __test_and_change_bit(int nr, volatile void *addr)
return retval;
}

extern int test_and_change_bit(int nr, volatile void *addr);
extern int test_and_change_bit(unsigned long nr, volatile void *addr);

#include <asm-generic/bitops/lock.h>

Expand Down
4 changes: 2 additions & 2 deletions arch/mn10300/lib/bitops.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/*
* try flipping a bit using BSET and BCLR
*/
void change_bit(int nr, volatile void *addr)
void change_bit(unsigned long nr, volatile void *addr)
{
if (test_bit(nr, addr))
goto try_clear_bit;
Expand All @@ -34,7 +34,7 @@ void change_bit(int nr, volatile void *addr)
/*
* try flipping a bit using BSET and BCLR and returning the old value
*/
int test_and_change_bit(int nr, volatile void *addr)
int test_and_change_bit(unsigned long nr, volatile void *addr)
{
if (test_bit(nr, addr))
goto try_clear_bit;
Expand Down

0 comments on commit e4acfca

Please sign in to comment.