projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51b89f7
)
ia64: boolean __test_and_clear_bit
author
Johannes Weiner
<[
[email protected]
]>
Tue, 11 Aug 2009 21:52:10 +0000
(14:52 -0700)
committer
Fenghua Yu
<
[email protected]
>
Tue, 11 Aug 2009 21:52:10 +0000
(14:52 -0700)
__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 <
[email protected]
>
Acked-by: Fenghua Yu <
[email protected]
>
arch/ia64/include/asm/bitops.h
patch
|
blob
|
history
diff --git
a/arch/ia64/include/asm/bitops.h
b/arch/ia64/include/asm/bitops.h
index e2ca800373351d26b1042394275ebe10f6c8d23e..57a2787bc9fb62e6d5cadc62a2bc394e78cca707 100644
(file)
--- 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;