diff options
author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2020-04-20 13:47:15 +0000 |
---|---|---|
committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2020-04-20 13:47:15 +0000 |
commit | 07fdea3672ff8e9f16c3888d5eae17be88da15d1 (patch) | |
tree | 9a33c0a37d99ba256631a7aacfec3558c91f8357 /sys/compat/linuxkpi/common/include/linux/bitops.h | |
parent | 1f15d49eea41a31e34c7d94a038380cc503f27e1 (diff) | |
download | src-07fdea3672ff8e9f16c3888d5eae17be88da15d1.tar.gz src-07fdea3672ff8e9f16c3888d5eae17be88da15d1.zip |
Allow test_bit() in the LinuxKPI to accept a const pointer.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Notes
Notes:
svn path=/head/; revision=360118
Diffstat (limited to 'sys/compat/linuxkpi/common/include/linux/bitops.h')
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/bitops.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index d7db988e4106..f3c62596bcf5 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h @@ -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) |