From 07fdea3672ff8e9f16c3888d5eae17be88da15d1 Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Mon, 20 Apr 2020 13:47:15 +0000 Subject: [PATCH] Allow test_bit() in the LinuxKPI to accept a const pointer. MFC after: 1 week Sponsored by: Mellanox Technologies --- sys/compat/linuxkpi/common/include/linux/bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)