diff options
Diffstat (limited to 'arch/mips/lib/bitops.c')
-rw-r--r-- | arch/mips/lib/bitops.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/mips/lib/bitops.c b/arch/mips/lib/bitops.c index 239a9c957b02..a64daee740ee 100644 --- a/arch/mips/lib/bitops.c +++ b/arch/mips/lib/bitops.c @@ -56,7 +56,7 @@ EXPORT_SYMBOL(__mips_clear_bit); /** - * __mips_change_bit - Toggle a bit in memory. This is called by change_bit() + * __mips_change_bit - Toggle a bit in memory. This is called by change_bit() * if it cannot find a faster solution. * @nr: Bit to change * @addr: Address to start counting from @@ -90,12 +90,12 @@ int __mips_test_and_set_bit(unsigned long nr, unsigned bit = nr & SZLONG_MASK; unsigned long mask; unsigned long flags; - unsigned long res; + int res; a += nr >> SZLONG_LOG; mask = 1UL << bit; raw_local_irq_save(flags); - res = (mask & *a); + res = (mask & *a) != 0; *a |= mask; raw_local_irq_restore(flags); return res; @@ -116,12 +116,12 @@ int __mips_test_and_set_bit_lock(unsigned long nr, unsigned bit = nr & SZLONG_MASK; unsigned long mask; unsigned long flags; - unsigned long res; + int res; a += nr >> SZLONG_LOG; mask = 1UL << bit; raw_local_irq_save(flags); - res = (mask & *a); + res = (mask & *a) != 0; *a |= mask; raw_local_irq_restore(flags); return res; @@ -141,12 +141,12 @@ int __mips_test_and_clear_bit(unsigned long nr, volatile unsigned long *addr) unsigned bit = nr & SZLONG_MASK; unsigned long mask; unsigned long flags; - unsigned long res; + int res; a += nr >> SZLONG_LOG; mask = 1UL << bit; raw_local_irq_save(flags); - res = (mask & *a); + res = (mask & *a) != 0; *a &= ~mask; raw_local_irq_restore(flags); return res; @@ -155,7 +155,7 @@ EXPORT_SYMBOL(__mips_test_and_clear_bit); /** - * __mips_test_and_change_bit - Change a bit and return its old value. This is + * __mips_test_and_change_bit - Change a bit and return its old value. This is * called by test_and_change_bit() if it cannot find a faster solution. * @nr: Bit to change * @addr: Address to count from @@ -166,12 +166,12 @@ int __mips_test_and_change_bit(unsigned long nr, volatile unsigned long *addr) unsigned bit = nr & SZLONG_MASK; unsigned long mask; unsigned long flags; - unsigned long res; + int res; a += nr >> SZLONG_LOG; mask = 1UL << bit; raw_local_irq_save(flags); - res = (mask & *a); + res = (mask & *a) != 0; *a ^= mask; raw_local_irq_restore(flags); return res; |