Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Apr 2020 13:47:15 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r360118 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <202004201347.03KDlFEh081142@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004201347.03KDlFEh081142>