Allow test_bit() in the LinuxKPI to accept a const pointer.

MFC after:	1 week
Sponsored by:	Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2020-04-20 13:47:15 +00:00
parent 1f15d49eea
commit 07fdea3672

View File

@ -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)