aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/random.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2022-08-17 12:30:00 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2022-08-17 12:30:00 -0700
commit93fbff1197474d7b65e598c6f48fa82a5c334539 (patch)
tree0ae3e5a39bf0403b893979dfac75ca26356646e5 /include/linux/random.h
parentInput: applespi - use correct struct names in comment (diff)
parenti2c: Make remove callback return void (diff)
downloadlinux-dev-93fbff1197474d7b65e598c6f48fa82a5c334539.tar.xz
linux-dev-93fbff1197474d7b65e598c6f48fa82a5c334539.zip
Merge branch 'i2c/make_remove_callback_void-immutable' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into next
Sync up with the latest I2C code base to get updated prototype of I2C bus remove() method.
Diffstat (limited to 'include/linux/random.h')
-rw-r--r--include/linux/random.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/include/linux/random.h b/include/linux/random.h
index 20e389a14e5c..3fec206487f6 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -106,32 +106,25 @@ declare_get_random_var_wait(long, unsigned long)
*/
#include <linux/prandom.h>
-#ifdef CONFIG_ARCH_RANDOM
-# include <asm/archrandom.h>
-#else
-static inline bool __must_check arch_get_random_long(unsigned long *v) { return false; }
-static inline bool __must_check arch_get_random_int(unsigned int *v) { return false; }
-static inline bool __must_check arch_get_random_seed_long(unsigned long *v) { return false; }
-static inline bool __must_check arch_get_random_seed_int(unsigned int *v) { return false; }
-#endif
+#include <asm/archrandom.h>
/*
* Called from the boot CPU during startup; not valid to call once
* secondary CPUs are up and preemption is possible.
*/
-#ifndef arch_get_random_seed_long_early
-static inline bool __init arch_get_random_seed_long_early(unsigned long *v)
+#ifndef arch_get_random_seed_longs_early
+static inline size_t __init arch_get_random_seed_longs_early(unsigned long *v, size_t max_longs)
{
WARN_ON(system_state != SYSTEM_BOOTING);
- return arch_get_random_seed_long(v);
+ return arch_get_random_seed_longs(v, max_longs);
}
#endif
-#ifndef arch_get_random_long_early
-static inline bool __init arch_get_random_long_early(unsigned long *v)
+#ifndef arch_get_random_longs_early
+static inline bool __init arch_get_random_longs_early(unsigned long *v, size_t max_longs)
{
WARN_ON(system_state != SYSTEM_BOOTING);
- return arch_get_random_long(v);
+ return arch_get_random_longs(v, max_longs);
}
#endif