aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compiler.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-09-10 16:39:51 +0100
committerMark Brown <broonie@kernel.org>2022-09-10 16:39:51 +0100
commit824723ccf53fc53ecf896753c562b00a5d6307eb (patch)
treec0ec150c4510eb161ba57a7fd39a1393f3b77cdd /include/linux/compiler.h
parentspi: Group cs_change and cs_off flags together in struct spi_transfer (diff)
parentLinux 6.0-rc4 (diff)
downloadlinux-dev-824723ccf53fc53ecf896753c562b00a5d6307eb.tar.xz
linux-dev-824723ccf53fc53ecf896753c562b00a5d6307eb.zip
spi: Merge tag 'v6.0-rc4' into spi-6.1
Linux 6.0-rc4 so we can test on BeagleBone again.
Diffstat (limited to 'include/linux/compiler.h')
-rw-r--r--include/linux/compiler.h6
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.
*/