Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4acfcac authored by Justin Chen's avatar Justin Chen Committed by David Howells
Browse files

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: default avatarJustin Chen <justin.chen@hp.com>
Reviewed-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
parent 292aa141
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -57,7 +57,7 @@
#define clear_bit(nr, addr) ___clear_bit((nr), (addr))
#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;
	unsigned int *a = (unsigned int *) addr;
	int mask;
	int mask;
@@ -70,7 +70,7 @@ static inline void __clear_bit(int nr, volatile void *addr)
/*
/*
 * test bit
 * 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));
	return 1UL & (((const unsigned int *) addr)[nr >> 5] >> (nr & 31));
}
}
@@ -78,7 +78,7 @@ static inline int test_bit(int nr, const volatile void *addr)
/*
/*
 * change bit
 * 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;
	int	mask;
	unsigned int *a = (unsigned int *) addr;
	unsigned int *a = (unsigned int *) addr;
@@ -88,7 +88,7 @@ static inline void __change_bit(int nr, volatile void *addr)
	*a ^= mask;
	*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
 * test and set bit
@@ -135,7 +135,7 @@ extern void change_bit(int nr, volatile void *addr);
/*
/*
 * test and change bit
 * 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;
	int	mask, retval;
	unsigned int *a = (unsigned int *)addr;
	unsigned int *a = (unsigned int *)addr;
@@ -148,7 +148,7 @@ static inline int __test_and_change_bit(int nr, volatile void *addr)
	return retval;
	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>
#include <asm-generic/bitops/lock.h>


+2 −2
Original line number Original line Diff line number Diff line
@@ -15,7 +15,7 @@
/*
/*
 * try flipping a bit using BSET and BCLR
 * 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))
	if (test_bit(nr, addr))
		goto try_clear_bit;
		goto try_clear_bit;
@@ -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
 * 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))
	if (test_bit(nr, addr))
		goto try_clear_bit;
		goto try_clear_bit;