diff options
| author | Dmitry Torokhov <[email protected]> | 2017-06-02 17:49:10 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2017-06-02 17:49:10 -0700 |
| commit | eadcbfa58ae8693f0d6a0f591d8f51d55cf068e1 (patch) | |
| tree | cff3f1c56a8bf15138b652ee9dab50dddd6edee5 /tools/include/linux/kernel.h | |
| parent | c4beedb8a914af9c8c1b6e67c753adf411e05160 (diff) | |
| parent | 5ed02dbb497422bf225783f46e6eadd237d23d6b (diff) | |
Merge tag 'v4.12-rc3' into for-linus
Merge with mainline to get acpi_dev_present() needed by patches to
axp20x-pek driver.
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 |