diff options
| author | Takashi Iwai <tiwai@suse.de> | 2022-09-22 13:54:20 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2022-09-22 13:54:20 +0200 |
| commit | af45a0d32df9c8f5abbbc7401d70ffa296c8cef6 (patch) | |
| tree | f162ece8fa7d94374d15801d614849db649282ac /include/linux/compiler.h | |
| parent | b5eee17cf7ddaf7b29a031b2c48277038e7a171a (diff) | |
| parent | c35fbea48659ec99a4f532c9ee9e8692405afdd0 (diff) | |
Merge branch 'for-linus' into for-next
Diffstat (limited to 'include/linux/compiler.h')
| -rw-r--r-- | include/linux/compiler.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 01ce94b58b42..7713d7bcdaea 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -240,6 +240,12 @@ static inline void *offset_to_ptr(const int *off) #define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) /* + * Whether 'type' is a signed type or an unsigned type. Supports scalar types, + * bool and also pointer types. + */ +#define is_signed_type(type) (((type)(-1)) < (__force type)1) + +/* * This is needed in functions which generate the stack canary, see * arch/x86/kernel/smpboot.c::start_secondary() for an example. */ |
