Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 May 2020 09:09:03 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r361176 - stable/12/sys/compat/linuxkpi/common/include/linux
Message-ID:  <202005180909.04I993IM051244@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Mon May 18 09:09:03 2020
New Revision: 361176
URL: https://svnweb.freebsd.org/changeset/base/361176

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

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

Modified: stable/12/sys/compat/linuxkpi/common/include/linux/bitops.h
==============================================================================
--- stable/12/sys/compat/linuxkpi/common/include/linux/bitops.h	Mon May 18 09:07:51 2020	(r361175)
+++ stable/12/sys/compat/linuxkpi/common/include/linux/bitops.h	Mon May 18 09:09:03 2020	(r361176)
@@ -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?202005180909.04I993IM051244>