mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-12 08:00:09 +00:00
s390/bitops: add for_each_set_bit_inv helper
Same helper function like for_each_set_bit in generic code. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
bffc880b45
commit
09214545c4
@ -253,6 +253,11 @@ unsigned long find_first_bit_inv(const unsigned long *addr, unsigned long size);
|
||||
unsigned long find_next_bit_inv(const unsigned long *addr, unsigned long size,
|
||||
unsigned long offset);
|
||||
|
||||
#define for_each_set_bit_inv(bit, addr, size) \
|
||||
for ((bit) = find_first_bit_inv((addr), (size)); \
|
||||
(bit) < (size); \
|
||||
(bit) = find_next_bit_inv((addr), (size), (bit) + 1))
|
||||
|
||||
static inline void set_bit_inv(unsigned long nr, volatile unsigned long *ptr)
|
||||
{
|
||||
return set_bit(nr ^ (BITS_PER_LONG - 1), ptr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user