diff options
Diffstat (limited to 'include/linux/kernel.h')
| -rw-r--r-- | include/linux/kernel.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 594b419b7d20..a123b13b70fd 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -1,15 +1,6 @@ | |||
| 1 | #ifndef _LINUX_KERNEL_H | 1 | #ifndef _LINUX_KERNEL_H |
| 2 | #define _LINUX_KERNEL_H | 2 | #define _LINUX_KERNEL_H |
| 3 | 3 | ||
| 4 | #include <linux/sysinfo.h> | ||
| 5 | |||
| 6 | /* | ||
| 7 | * 'kernel.h' contains some often-used function prototypes etc | ||
| 8 | */ | ||
| 9 | #define __ALIGN_KERNEL(x, a) __ALIGN_KERNEL_MASK(x, (typeof(x))(a) - 1) | ||
| 10 | #define __ALIGN_KERNEL_MASK(x, mask) (((x) + (mask)) & ~(mask)) | ||
| 11 | |||
| 12 | #ifdef __KERNEL__ | ||
| 13 | 4 | ||
| 14 | #include <stdarg.h> | 5 | #include <stdarg.h> |
| 15 | #include <linux/linkage.h> | 6 | #include <linux/linkage.h> |
| @@ -22,6 +13,7 @@ | |||
| 22 | #include <linux/printk.h> | 13 | #include <linux/printk.h> |
| 23 | #include <linux/dynamic_debug.h> | 14 | #include <linux/dynamic_debug.h> |
| 24 | #include <asm/byteorder.h> | 15 | #include <asm/byteorder.h> |
| 16 | #include <uapi/linux/kernel.h> | ||
| 25 | 17 | ||
| 26 | #define USHRT_MAX ((u16)(~0U)) | 18 | #define USHRT_MAX ((u16)(~0U)) |
| 27 | #define SHRT_MAX ((s16)(USHRT_MAX>>1)) | 19 | #define SHRT_MAX ((s16)(USHRT_MAX>>1)) |
| @@ -91,7 +83,7 @@ | |||
| 91 | { \ | 83 | { \ |
| 92 | typeof(x) __x = x; \ | 84 | typeof(x) __x = x; \ |
| 93 | typeof(divisor) __d = divisor; \ | 85 | typeof(divisor) __d = divisor; \ |
| 94 | (((typeof(x))-1) >= 0 || (__x) >= 0) ? \ | 86 | (((typeof(x))-1) > 0 || (__x) > 0) ? \ |
| 95 | (((__x) + ((__d) / 2)) / (__d)) : \ | 87 | (((__x) + ((__d) / 2)) / (__d)) : \ |
| 96 | (((__x) - ((__d) / 2)) / (__d)); \ | 88 | (((__x) - ((__d) / 2)) / (__d)); \ |
| 97 | } \ | 89 | } \ |
| @@ -716,6 +708,4 @@ static inline void ftrace_dump(enum ftrace_dump_mode oops_dump_mode) { } | |||
| 716 | 708 | ||
| 717 | extern int do_sysinfo(struct sysinfo *info); | 709 | extern int do_sysinfo(struct sysinfo *info); |
| 718 | 710 | ||
| 719 | #endif /* __KERNEL__ */ | ||
| 720 | |||
| 721 | #endif | 711 | #endif |
