Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 May 2020 09:09:35 +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-11@freebsd.org
Subject:   svn commit: r361177 - stable/11/sys/compat/linuxkpi/common/include/linux
Message-ID:  <202005180909.04I99ZAe051496@repo.freebsd.org>

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



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