diff options
Diffstat (limited to 'include/linux/kernel.h')
-rw-r--r-- | include/linux/kernel.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 50220cab738c..05b63a1e9f84 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -53,6 +53,13 @@ | |||
53 | 53 | ||
54 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) | 54 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr)) |
55 | 55 | ||
56 | #define u64_to_user_ptr(x) ( \ | ||
57 | { \ | ||
58 | typecheck(u64, x); \ | ||
59 | (void __user *)(uintptr_t)x; \ | ||
60 | } \ | ||
61 | ) | ||
62 | |||
56 | /* | 63 | /* |
57 | * This looks more complex than it should be. But we need to | 64 | * This looks more complex than it should be. But we need to |
58 | * get the type for the ~ right in round_down (it needs to be | 65 | * get the type for the ~ right in round_down (it needs to be |