Author: hselasky
Date: Mon May 18 09:09:34 2020
New Revision: 361177
URL: https://svnweb.freebsd.org/changeset/base/361177

Log:
  MFC r360118:
  Allow test_bit() in the LinuxKPI to accept a const pointer.
  
  Sponsored by: Mellanox Technologies

Modified:
  stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h
==============================================================================
--- stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Mon May 18 
09:09:03 2020        (r361176)
+++ stable/11/sys/compat/linuxkpi/common/include/linux/bitops.h Mon May 18 
09:09:34 2020        (r361177)
@@ -273,7 +273,7 @@ find_next_zero_bit(const unsigned long *addr, unsigned
     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)
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to