aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/compiler_types.h
diff options
context:
space:
mode:
authorMarco Elver <elver@google.com>2020-05-28 09:43:13 +0200
committerWill Deacon <will@kernel.org>2020-06-05 11:40:01 +0100
commitb398ace5d2ea0b7f00d9f1ce23c647e289c206ca (patch)
tree01e906e9b6af66e21bfcbc61b5d1c1f7a43c3ed8 /include/linux/compiler_types.h
parentcompiler_types.h: Optimize __unqual_scalar_typeof compilation time (diff)
downloadwireguard-linux-b398ace5d2ea0b7f00d9f1ce23c647e289c206ca.tar.xz
wireguard-linux-b398ace5d2ea0b7f00d9f1ce23c647e289c206ca.zip
compiler_types.h: Use unoptimized __unqual_scalar_typeof for sparse
If the file is being checked with sparse, use the unoptimized version of __unqual_scalar_typeof(), since sparse does not support _Generic. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Marco Elver <elver@google.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/202005280727.lXn1VnTw%lkp@intel.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'include/linux/compiler_types.h')
-rw-r--r--include/linux/compiler_types.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index 31416b60eabf..cd73e3857a87 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -214,7 +214,7 @@ struct ftrace_likely_data {
* __unqual_scalar_typeof(x) - Declare an unqualified scalar type, leaving
* non-scalar types unchanged.
*/
-#if defined(CONFIG_CC_IS_GCC) && CONFIG_GCC_VERSION < 40900
+#if (defined(CONFIG_CC_IS_GCC) && CONFIG_GCC_VERSION < 40900) || defined(__CHECKER__)
/*
* We build this out of a couple of helper macros in a vain attempt to
* help you keep your lunch down while reading it.