Allow test_bit() in the LinuxKPI to accept a const pointer.
MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
1f15d49eea
commit
07fdea3672
@ -273,7 +273,7 @@ find_next_zero_bit(const unsigned long *addr, unsigned long size,
|
||||
atomic_clear_long(&((volatile unsigned long *)(a))[BIT_WORD(i)], BIT_MASK(i))
|
||||
|
||||
#define test_bit(i, a) \
|
||||
!!(READ_ONCE(((volatile unsigned long *)(a))[BIT_WORD(i)]) & BIT_MASK(i))
|
||||
!!(READ_ONCE(((volatile const unsigned long *)(a))[BIT_WORD(i)]) & BIT_MASK(i))
|
||||
|
||||
static inline int
|
||||
test_and_clear_bit(long bit, volatile unsigned long *var)
|
||||
|
Loading…
Reference in New Issue
Block a user