diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-08-24 12:11:29 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-08-24 12:11:29 +0200 |
commit | eb4e841099f813c2df5fbb00ae4a9d315cb7c9dc (patch) | |
tree | 15c1f7e595cb3168035d111d628c919a61f3b14a /include/linux/compiler.h | |
parent | 556b6723689694ac9134bcc36a07828168e057f4 (diff) | |
parent | fa8410b355251fd30341662a40ac6b22d3e38468 (diff) |
Merge tag 'v4.8-rc3' into x86/asm, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/compiler.h')
-rw-r--r-- | include/linux/compiler.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 1bb954842725..436aa4e42221 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -527,13 +527,13 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s * object's lifetime is managed by something other than RCU. That * "something other" might be reference counting or simple immortality. * - * The seemingly unused void * variable is to validate @p is indeed a pointer - * type. All pointer types silently cast to void *. + * The seemingly unused size_t variable is to validate @p is indeed a pointer + * type by making sure it can be dereferenced. */ #define lockless_dereference(p) \ ({ \ typeof(p) _________p1 = READ_ONCE(p); \ - __maybe_unused const void * const _________p2 = _________p1; \ + size_t __maybe_unused __size_of_ptr = sizeof(*(p)); \ smp_read_barrier_depends(); /* Dependency order vs. p above. */ \ (_________p1); \ }) |