svn commit: r360118 - head/sys/compat/linuxkpi/common/include/linux

Hans Petter Selasky hselasky at FreeBSD.org
Mon Apr 20 13:47:18 UTC 2020


Author: hselasky
Date: Mon Apr 20 13:47:15 2020
New Revision: 360118
URL: https://svnweb.freebsd.org/changeset/base/360118

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

Modified:
  head/sys/compat/linuxkpi/common/include/linux/bitops.h

Modified: head/sys/compat/linuxkpi/common/include/linux/bitops.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/bitops.h	Mon Apr 20 13:47:07 2020	(r360117)
+++ head/sys/compat/linuxkpi/common/include/linux/bitops.h	Mon Apr 20 13:47:15 2020	(r360118)
@@ -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)


More information about the svn-src-head mailing list