diff options
| author | Russell King <rmk+kernel@armlinux.org.uk> | 2017-04-06 01:43:03 +0300 |
|---|---|---|
| committer | Russell King <rmk+kernel@armlinux.org.uk> | 2017-04-06 01:43:03 +0300 |
| commit | 3872fe83a2fbb7366daa93ca533a22138e2d483e (patch) | |
| tree | e9c7c7a4a09a551011286a866235594b76cb73af /include/linux/random.h | |
| parent | 3cc070c1c81948b33ebe2ea68cd39307ce2b312d (diff) | |
| parent | 974310d047f3c7788a51d10c8d255eebdb1fa857 (diff) | |
| download | linux-3872fe83a2fbb7366daa93ca533a22138e2d483e.tar.xz | |
Merge branch 'kprobe-fixes' of https://git.linaro.org/people/tixy/kernel into fixes
Diffstat (limited to 'include/linux/random.h')
| -rw-r--r-- | include/linux/random.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/include/linux/random.h b/include/linux/random.h index 7bd2403e4fef..ed5c3838780d 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -37,14 +37,26 @@ extern void get_random_bytes(void *buf, int nbytes); extern int add_random_ready_callback(struct random_ready_callback *rdy); extern void del_random_ready_callback(struct random_ready_callback *rdy); extern void get_random_bytes_arch(void *buf, int nbytes); -extern int random_int_secret_init(void); #ifndef MODULE extern const struct file_operations random_fops, urandom_fops; #endif -unsigned int get_random_int(void); -unsigned long get_random_long(void); +u32 get_random_u32(void); +u64 get_random_u64(void); +static inline unsigned int get_random_int(void) +{ + return get_random_u32(); +} +static inline unsigned long get_random_long(void) +{ +#if BITS_PER_LONG == 64 + return get_random_u64(); +#else + return get_random_u32(); +#endif +} + unsigned long randomize_page(unsigned long start, unsigned long range); u32 prandom_u32(void); |
