Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

random: remove unused get_random_var_wait functions

None of these functions are used, so remove them.

This renders the two bugs moot:

- get_random_u64_wait() used the wrong pointer type, making it provide
only 32 bits.

- The '#undef' directive used the wrong identifier, leaving the helper
macro defined.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

authored by

Eric Biggers and committed by
Jason A. Donenfeld
933ecf59 aba5f969

-15
-15
include/linux/random.h
··· 130 130 return ret; 131 131 } 132 132 133 - #define declare_get_random_var_wait(name, ret_type) \ 134 - static inline int get_random_ ## name ## _wait(ret_type *out) { \ 135 - int ret = wait_for_random_bytes(); \ 136 - if (unlikely(ret)) \ 137 - return ret; \ 138 - *out = get_random_ ## name(); \ 139 - return 0; \ 140 - } 141 - declare_get_random_var_wait(u8, u8) 142 - declare_get_random_var_wait(u16, u16) 143 - declare_get_random_var_wait(u32, u32) 144 - declare_get_random_var_wait(u64, u32) 145 - declare_get_random_var_wait(long, unsigned long) 146 - #undef declare_get_random_var 147 - 148 133 #ifdef CONFIG_SMP 149 134 int random_prepare_cpu(unsigned int cpu); 150 135 int random_online_cpu(unsigned int cpu);