aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r--include/linux/kernel.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 9ddf25c21538..144b615f3a89 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -35,7 +35,8 @@ extern const char linux_proc_banner[];
35#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) 35#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1)
36#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) 36#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
37 37
38#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) 38#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
39
39#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) 40#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
40#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) 41#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
41#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) 42#define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
@@ -121,6 +122,7 @@ extern int vscnprintf(char *buf, size_t size, const char *fmt, va_list args)
121 __attribute__ ((format (printf, 3, 0))); 122 __attribute__ ((format (printf, 3, 0)));
122extern char *kasprintf(gfp_t gfp, const char *fmt, ...) 123extern char *kasprintf(gfp_t gfp, const char *fmt, ...)
123 __attribute__ ((format (printf, 2, 3))); 124 __attribute__ ((format (printf, 2, 3)));
125extern char *kvasprintf(gfp_t gfp, const char *fmt, va_list args);
124 126
125extern int sscanf(const char *, const char *, ...) 127extern int sscanf(const char *, const char *, ...)
126 __attribute__ ((format (scanf, 2, 3))); 128 __attribute__ ((format (scanf, 2, 3)));