aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compiler.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-09-30 12:40:40 -0400
committerTakashi Iwai <tiwai@suse.de>2016-09-30 12:40:40 -0400
commiteeea8b40cd2866ca24f25e5ef09225edb076ae45 (patch)
treeece5b5287ee2ce53a841b66d0f526947f74d036f /include/linux/compiler.h
parent3383c5c395386ac8e258b1a324c72ce850b84a9e (diff)
parent513e43efafe329dad7b5794583b67ac898dcbdca (diff)
Merge tag 'asoc-v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v4.9 Apart from the cleanups done by Morimoto-san this has very much been a driver focused release with very little generic change: - A big factoring out of the simple-card code to allow it to be shared more with the rcar generic card from Kuninori Morimoto. - Removal of some operations duplicated on the CODEC level, again by Kuninori Morimoto. - Lots more machine support for x86 systems. - New drivers for Nuvoton NAU88C10, Realtek RT5660 and RT5663.
Diffstat (limited to 'include/linux/compiler.h')
-rw-r--r--include/linux/compiler.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 436aa4e42221..668569844d37 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -527,13 +527,14 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
527 * object's lifetime is managed by something other than RCU. That 527 * object's lifetime is managed by something other than RCU. That
528 * "something other" might be reference counting or simple immortality. 528 * "something other" might be reference counting or simple immortality.
529 * 529 *
530 * The seemingly unused size_t variable is to validate @p is indeed a pointer 530 * The seemingly unused variable ___typecheck_p validates that @p is
531 * type by making sure it can be dereferenced. 531 * indeed a pointer type by using a pointer to typeof(*p) as the type.
532 * Taking a pointer to typeof(*p) again is needed in case p is void *.
532 */ 533 */
533#define lockless_dereference(p) \ 534#define lockless_dereference(p) \
534({ \ 535({ \
535 typeof(p) _________p1 = READ_ONCE(p); \ 536 typeof(p) _________p1 = READ_ONCE(p); \
536 size_t __maybe_unused __size_of_ptr = sizeof(*(p)); \ 537 typeof(*(p)) *___typecheck_p __maybe_unused; \
537 smp_read_barrier_depends(); /* Dependency order vs. p above. */ \ 538 smp_read_barrier_depends(); /* Dependency order vs. p above. */ \
538 (_________p1); \ 539 (_________p1); \
539}) 540})