diff options
| author | Eric Biggers <ebiggers@kernel.org> | 2025-11-02 07:19:41 +0300 |
|---|---|---|
| committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2025-11-02 15:40:13 +0300 |
| commit | 933ecf591275e850a46b28c6016d2688b92e23f6 (patch) | |
| tree | 0d682e1b72b270ef867774992e86e3d65b3cfa2d /include/linux/random.h | |
| parent | aba5f969f886d298c7fc777538a12b52095203ab (diff) | |
| download | linux-933ecf591275e850a46b28c6016d2688b92e23f6.tar.xz | |
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>
Diffstat (limited to 'include/linux/random.h')
| -rw-r--r-- | include/linux/random.h | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/include/linux/random.h b/include/linux/random.h index 333cecfca93f..8a8064dc3970 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -130,21 +130,6 @@ static inline int get_random_bytes_wait(void *buf, size_t nbytes) return ret; } -#define declare_get_random_var_wait(name, ret_type) \ - static inline int get_random_ ## name ## _wait(ret_type *out) { \ - int ret = wait_for_random_bytes(); \ - if (unlikely(ret)) \ - return ret; \ - *out = get_random_ ## name(); \ - return 0; \ - } -declare_get_random_var_wait(u8, u8) -declare_get_random_var_wait(u16, u16) -declare_get_random_var_wait(u32, u32) -declare_get_random_var_wait(u64, u32) -declare_get_random_var_wait(long, unsigned long) -#undef declare_get_random_var - #ifdef CONFIG_SMP int random_prepare_cpu(unsigned int cpu); int random_online_cpu(unsigned int cpu); |
