diff options
| author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-09-13 03:12:20 +0200 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-09-13 03:12:20 +0200 |
| commit | f75ee9a8816824683e22aee2790f43a9fc43c613 (patch) | |
| tree | 8eb48525bcd0291668d56d0bc4e8a0467467b9b3 /include/linux/compiler.h | |
| parent | bd2058dc1aa88ac5690184f85a1e5051b12cd573 (diff) | |
| parent | 20a875e2e86e73d13ec256781a7d55a7885868ec (diff) | |
Merge branch 'device-properties' into acpi-soc
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); \ }) |
