| .. | .. |
|---|
| 5 | 5 | #include <stdarg.h> |
|---|
| 6 | 6 | #include <stddef.h> |
|---|
| 7 | 7 | #include <assert.h> |
|---|
| 8 | +#include <linux/build_bug.h> |
|---|
| 8 | 9 | #include <linux/compiler.h> |
|---|
| 9 | 10 | #include <endian.h> |
|---|
| 10 | 11 | #include <byteswap.h> |
|---|
| .. | .. |
|---|
| 34 | 35 | const typeof(((type *)0)->member) * __mptr = (ptr); \ |
|---|
| 35 | 36 | (type *)((char *)__mptr - offsetof(type, member)); }) |
|---|
| 36 | 37 | #endif |
|---|
| 37 | | - |
|---|
| 38 | | -#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) |
|---|
| 39 | | -#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) |
|---|
| 40 | 38 | |
|---|
| 41 | 39 | #ifndef max |
|---|
| 42 | 40 | #define max(x, y) ({ \ |
|---|
| .. | .. |
|---|
| 70 | 68 | #define BUG_ON(cond) assert(!(cond)) |
|---|
| 71 | 69 | #endif |
|---|
| 72 | 70 | #endif |
|---|
| 71 | +#define BUG() BUG_ON(1) |
|---|
| 73 | 72 | |
|---|
| 74 | 73 | #if __BYTE_ORDER == __BIG_ENDIAN |
|---|
| 75 | 74 | #define cpu_to_le16 bswap_16 |
|---|
| .. | .. |
|---|
| 101 | 100 | |
|---|
| 102 | 101 | int vscnprintf(char *buf, size_t size, const char *fmt, va_list args); |
|---|
| 103 | 102 | int scnprintf(char * buf, size_t size, const char * fmt, ...); |
|---|
| 103 | +int scnprintf_pad(char * buf, size_t size, const char * fmt, ...); |
|---|
| 104 | 104 | |
|---|
| 105 | 105 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) |
|---|
| 106 | 106 | |
|---|
| .. | .. |
|---|
| 115 | 115 | #define round_down(x, y) ((x) & ~__round_mask(x, y)) |
|---|
| 116 | 116 | |
|---|
| 117 | 117 | #define current_gfp_context(k) 0 |
|---|
| 118 | | -#define synchronize_sched() |
|---|
| 118 | +#define synchronize_rcu() |
|---|
| 119 | 119 | |
|---|
| 120 | 120 | #endif |
|---|