mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] ia64: boolean __test_and_clear_bit
@ 2009-07-21 15:09 Johannes Weiner
  0 siblings, 0 replies; only message in thread
From: Johannes Weiner @ 2009-07-21 15:09 UTC (permalink / raw)
  To: Tony Luck, Fenghua Yu; +Cc: linux-ia64, linux-kernel

__test_and_clear_bit() returns a bitfield with the tested-for bit set.
Make it consistent with the other bitops - of ia64 but also every
other architecture - and return a boolean value.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
---
 arch/ia64/include/asm/bitops.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/ia64/include/asm/bitops.h b/arch/ia64/include/asm/bitops.h
index e2ca800..57a2787 100644
--- a/arch/ia64/include/asm/bitops.h
+++ b/arch/ia64/include/asm/bitops.h
@@ -286,7 +286,7 @@ __test_and_clear_bit(int nr, volatile void * addr)
 {
 	__u32 *p = (__u32 *) addr + (nr >> 5);
 	__u32 m = 1 << (nr & 31);
-	int oldbitset = *p & m;
+	int oldbitset = (*p & m) != 0;
 
 	*p &= ~m;
 	return oldbitset;
-- 
1.6.3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-21 15:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-21 15:09 [patch] ia64: boolean __test_and_clear_bit Johannes Weiner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®