diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2021-06-30 09:02:28 +0200 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2021-06-30 09:02:28 +0200 |
| commit | 5a94296bc02ac616336da7b5332b86d2ca8827f0 (patch) | |
| tree | d13c4e7db2b4b01adb87fbf2ea5bafd2dc920b2f /include/linux/kernel.h | |
| parent | 3b770932eefb7c0c6319d332023efee87eb12913 (diff) | |
| parent | 24a31ea94922d391a96a9dd0a9a830de65423817 (diff) | |
Merge branch 'for-5.14/amd-sfh' into for-linus
- support for Renoir and Cezanne SoCs
- support for Ambient Light Sensor
- support for Human Presence Detection sensor
all from Basavaraj Natikar
Diffstat (limited to 'include/linux/kernel.h')
| -rw-r--r-- | include/linux/kernel.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 5b7ed6dc99ac..15d8bad3d2f2 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -3,6 +3,7 @@ #define _LINUX_KERNEL_H #include <stdarg.h> +#include <linux/align.h> #include <linux/limits.h> #include <linux/linkage.h> #include <linux/stddef.h> @@ -30,14 +31,6 @@ */ #define REPEAT_BYTE(x) ((~0ul / 0xff) * (x)) -/* @a is a power of 2 value */ -#define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) -#define ALIGN_DOWN(x, a) __ALIGN_KERNEL((x) - ((a) - 1), (a)) -#define __ALIGN_MASK(x, mask) __ALIGN_KERNEL_MASK((x), (mask)) -#define PTR_ALIGN(p, a) ((typeof(p))ALIGN((unsigned long)(p), (a))) -#define PTR_ALIGN_DOWN(p, a) ((typeof(p))ALIGN_DOWN((unsigned long)(p), (a))) -#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) - /* generic data direction definitions */ #define READ 0 #define WRITE 1 @@ -48,6 +41,8 @@ */ #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) +#define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL) + #define u64_to_user_ptr(x) ( \ { \ typecheck(u64, (x)); \ |
