diff options
| author | Ingo Molnar <mingo@kernel.org> | 2025-04-09 22:00:25 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2025-04-09 22:00:25 +0200 |
| commit | 78a84fbfa4ffc4bb6e95560a909b2ac3efa0aad2 (patch) | |
| tree | db18cc54b9b0b43bd0ed78dc76eef64aababb98f /include/linux/compiler.h | |
| parent | 60567e93c05d7064c93830cf4bf0d2c58f11b2f2 (diff) | |
| parent | 0af2f6be1b4281385b618cb86ad946eded089ac8 (diff) | |
Merge tag 'v6.15-rc1' into x86/mm, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/compiler.h')
| -rw-r--r-- | include/linux/compiler.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 9fc30b6b80c9..27725f1ab5ab 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -226,6 +226,26 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val, __BUILD_BUG_ON_ZERO_MSG(!__is_noncstr(p), \ "must be non-C-string (not NUL-terminated)") +/* + * Use __typeof_unqual__() when available. + * + * XXX: Remove test for __CHECKER__ once + * sparse learns about __typeof_unqual__(). + */ +#if CC_HAS_TYPEOF_UNQUAL && !defined(__CHECKER__) +# define USE_TYPEOF_UNQUAL 1 +#endif + +/* + * Define TYPEOF_UNQUAL() to use __typeof_unqual__() as typeof + * operator when available, to return an unqualified type of the exp. + */ +#if defined(USE_TYPEOF_UNQUAL) +# define TYPEOF_UNQUAL(exp) __typeof_unqual__(exp) +#else +# define TYPEOF_UNQUAL(exp) __typeof__(exp) +#endif + #endif /* __KERNEL__ */ #if defined(CONFIG_CFI_CLANG) && !defined(__DISABLE_EXPORTS) && !defined(BUILD_VDSO) |
