diff options
| author | Ingo Molnar <[email protected]> | 2017-05-05 08:20:52 +0200 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2017-05-05 08:21:03 +0200 |
| commit | 415812f2d6b856d33ede9bf4a2b95575dbbb3d4e (patch) | |
| tree | 4daf9ca52f89ea59453538b406f584d47c77aff3 /tools/include/linux/kernel.h | |
| parent | 42fc6c6cb1662ba2fa727dd01c9473c63be4e3b6 (diff) | |
| parent | d3b5d35290d729a2518af00feca867385a1b08fa (diff) | |
Merge branch 'linus' into x86/urgent, to pick up dependent commits
We are going to fix a bug introduced by a more recent commit, so
refresh the tree.
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/include/linux/kernel.h')
| -rw-r--r-- | tools/include/linux/kernel.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/include/linux/kernel.h b/tools/include/linux/kernel.h index 28607db02bd3..73ccc48126bb 100644 --- a/tools/include/linux/kernel.h +++ b/tools/include/linux/kernel.h @@ -4,6 +4,11 @@ #include <stdarg.h> #include <stddef.h> #include <assert.h> +#include <linux/compiler.h> + +#ifndef UINT_MAX +#define UINT_MAX (~0U) +#endif #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) @@ -72,6 +77,8 @@ int vscnprintf(char *buf, size_t size, const char *fmt, va_list args); int scnprintf(char * buf, size_t size, const char * fmt, ...); +#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) + /* * This looks more complex than it should be. But we need to * get the type for the ~ right in round_down (it needs to be |