diff options
Diffstat (limited to 'include/linux/bitops.h')
-rw-r--r-- | include/linux/bitops.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 9a874deee6e2..4cac4e1a72ff 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _LINUX_BITOPS_H #define _LINUX_BITOPS_H #include <asm/types.h> @@ -260,7 +261,7 @@ static __always_inline void __assign_bit(long nr, volatile unsigned long *addr, typeof(*ptr) old, new; \ \ do { \ - old = ACCESS_ONCE(*ptr); \ + old = READ_ONCE(*ptr); \ new = (old & ~mask) | bits; \ } while (cmpxchg(ptr, old, new) != old); \ \ @@ -275,7 +276,7 @@ static __always_inline void __assign_bit(long nr, volatile unsigned long *addr, typeof(*ptr) old, new; \ \ do { \ - old = ACCESS_ONCE(*ptr); \ + old = READ_ONCE(*ptr); \ new = old & ~clear; \ } while (!(old & test) && \ cmpxchg(ptr, old, new) != old); \ |