diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index 1a957ea2f4fe..94a18e8ccf7e 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -469,7 +469,8 @@ struct ftrace_likely_data { unsigned type: (unsigned type)0, \ signed type: (signed type)0 -#define __unqual_scalar_typeof(x) typeof( \ +#if defined(CONFIG_ARCH_SUPPORTS_INT128) && defined(__SIZEOF_INT128__) + #define __unqual_scalar_typeof(x) typeof( \ _Generic((x), \ char: (char)0, \ __scalar_type_to_expr_cases(char), \ @@ -477,7 +478,19 @@ struct ftrace_likely_data { __scalar_type_to_expr_cases(int), \ __scalar_type_to_expr_cases(long), \ __scalar_type_to_expr_cases(long long), \ + __scalar_type_to_expr_cases(__int128), \ default: (x))) +#else + #define __unqual_scalar_typeof(x) typeof( \ + _Generic((x), \ + char: (char)0, \ + __scalar_type_to_expr_cases(char), \ + __scalar_type_to_expr_cases(short), \ + __scalar_type_to_expr_cases(int), \ + __scalar_type_to_expr_cases(long), \ + __scalar_type_to_expr_cases(long long), \ + default: (x))) +#endif /* Is this type a native word size -- useful for atomic operations */ #define __native_word(t) \