diff options
author | 2021-02-22 21:21:03 -0800 | |
---|---|---|
committer | 2021-02-22 21:21:03 -0800 | |
commit | 415e915fdfc775ad0c6675fde1008f6f43dd6251 (patch) | |
tree | 429851187c0e85daa78f5d2bb6853959a1f5545b /include/linux/compiler_types.h | |
parent | Input: applespi - fix occasional crc errors under load. (diff) | |
parent | Linux 5.11 (diff) | |
download | linux-rng-415e915fdfc775ad0c6675fde1008f6f43dd6251.tar.xz linux-rng-415e915fdfc775ad0c6675fde1008f6f43dd6251.zip |
Merge tag 'v5.11' into next
Merge with mainline to get latest APIs and device tree bindings.
Diffstat (limited to 'include/linux/compiler_types.h')
-rw-r--r-- | include/linux/compiler_types.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index 6e390d58a9f8..e5dd5a4ae946 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -64,6 +64,17 @@ static inline void __chk_io_ptr(const volatile void __iomem *ptr) { } /* Attributes */ #include <linux/compiler_attributes.h> +/* Builtins */ + +/* + * __has_builtin is supported on gcc >= 10, clang >= 3 and icc >= 21. + * In the meantime, to support gcc < 10, we implement __has_builtin + * by hand. + */ +#ifndef __has_builtin +#define __has_builtin(x) (0) +#endif + /* Compiler specific macros. */ #ifdef __clang__ #include <linux/compiler-clang.h> @@ -110,12 +121,6 @@ struct ftrace_likely_data { unsigned long constant; }; -#ifdef CONFIG_ENABLE_MUST_CHECK -#define __must_check __attribute__((__warn_unused_result__)) -#else -#define __must_check -#endif - #if defined(CC_USING_HOTPATCH) #define notrace __attribute__((hotpatch(0, 0))) #elif defined(CC_USING_PATCHABLE_FUNCTION_ENTRY) @@ -247,10 +252,6 @@ struct ftrace_likely_data { #define asm_inline asm #endif -#ifndef __no_fgcse -# define __no_fgcse -#endif - /* Are two types/vars the same type (ignoring qualifiers)? */ #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) |