Skip to content

Commit b398ace

Browse files
melverwilldeacon
authored andcommitted
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 <[email protected]> Signed-off-by: Marco Elver <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/202005280727.lXn1VnTw%[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 1fd7604 commit b398ace

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/compiler_types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ struct ftrace_likely_data {
214214
* __unqual_scalar_typeof(x) - Declare an unqualified scalar type, leaving
215215
* non-scalar types unchanged.
216216
*/
217-
#if defined(CONFIG_CC_IS_GCC) && CONFIG_GCC_VERSION < 40900
217+
#if (defined(CONFIG_CC_IS_GCC) && CONFIG_GCC_VERSION < 40900) || defined(__CHECKER__)
218218
/*
219219
* We build this out of a couple of helper macros in a vain attempt to
220220
* help you keep your lunch down while reading it.

0 commit comments

Comments
 (0)