]> git.baikalelectronics.ru Git - kernel.git/commit
compiler.h: Avoid nested statement expression in data_race()
authorMarco Elver <elver@google.com>
Thu, 21 May 2020 14:20:45 +0000 (16:20 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 11 Jun 2020 18:04:03 +0000 (20:04 +0200)
commitfb7edff5aabff520054457593eec455d29baeaa0
tree36c2bef7ca18abc47f453cd2e518151be054886b
parentfbf692b26afc3523353edfa6c5faf2b5c2058815
compiler.h: Avoid nested statement expression in data_race()

It appears that compilers have trouble with nested statement
expressions. Therefore, remove one level of statement expression nesting
from the data_race() macro. This will help avoiding potential problems
in the future as its usage increases.

Reported-by: Borislav Petkov <bp@suse.de>
Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Will Deacon <will@kernel.org>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Link: https://lkml.kernel.org/r/20200520221712.GA21166@zn.tnic
Link: https://lkml.kernel.org/r/20200521142047.169334-10-elver@google.com
include/linux/compiler.h