summaryrefslogtreecommitdiffstats
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 12:40:01 +0200
commitb398ace5d2ea0b7f00d9f1ce23c647e289c206ca (patch)
tree01e906e9b6af66e21bfcbc61b5d1c1f7a43c3ed8
parentcompiler_types.h: Optimize __unqual_scalar_typeof compilation time (diff)
downloadlinux-b398ace5d2ea0b7f00d9f1ce23c647e289c206ca.tar.xz
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>
-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.