diff options
-rw-r--r-- | drivers/char/random.c | 19 | ||||
-rw-r--r-- | include/linux/random.h | 1 |
2 files changed, 0 insertions, 20 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c index 40eb07e79b02..d131e152c8ce 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c @@ -2100,25 +2100,6 @@ unsigned long get_random_long(void) } EXPORT_SYMBOL(get_random_long); -/* - * randomize_range() returns a start address such that - * - * [...... <range> .....] - * start end - * - * a <range> with size "len" starting at the return value is inside in the - * area defined by [start, end], but is otherwise randomized. - */ -unsigned long -randomize_range(unsigned long start, unsigned long end, unsigned long len) -{ - unsigned long range = end - len - start; - - if (end <= start + len) - return 0; - return PAGE_ALIGN(get_random_int() % range + start); -} - /** * randomize_page - Generate a random, page aligned address * @start: The smallest acceptable address the caller will take. diff --git a/include/linux/random.h b/include/linux/random.h index 26741892828a..f7bb7a355cf7 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -34,7 +34,6 @@ extern const struct file_operations random_fops, urandom_fops; unsigned int get_random_int(void); unsigned long get_random_long(void); -unsigned long randomize_range(unsigned long start, unsigned long end, unsigned long len); unsigned long randomize_page(unsigned long start, unsigned long range); u32 prandom_u32(void); |