mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
s390/bitops: add test_and_clear_bit_inv()
This patch adds a MSB0 bit numbering version of test_and_clear_bit(). Signed-off-by: Jens Freimann <[email protected]> Signed-off-by: Michael Mueller <[email protected]> Reviewed-by: Pierre Morel <[email protected]> Reviewed-by: Halil Pasic <[email protected]> Reviewed-by: Christian Borntraeger <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Reviewed-by: Cornelia Huck <[email protected]> Acked-by: Martin Schwidefsky <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]>
This commit is contained in:
parent
19114beb73
commit
f3ec471a98
1 changed files with 5 additions and 0 deletions
|
|
@ -261,6 +261,11 @@ static inline void clear_bit_inv(unsigned long nr, volatile unsigned long *ptr)
|
|||
return clear_bit(nr ^ (BITS_PER_LONG - 1), ptr);
|
||||
}
|
||||
|
||||
static inline int test_and_clear_bit_inv(unsigned long nr, volatile unsigned long *ptr)
|
||||
{
|
||||
return test_and_clear_bit(nr ^ (BITS_PER_LONG - 1), ptr);
|
||||
}
|
||||
|
||||
static inline void __set_bit_inv(unsigned long nr, volatile unsigned long *ptr)
|
||||
{
|
||||
return __set_bit(nr ^ (BITS_PER_LONG - 1), ptr);
|
||||
|
|
|
|||
Loading…
Reference in a new issue