mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
lib/: rename random32() to prandom_u32()
Use preferable function name which implies using a pseudo-random number generator. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
56a1ba5fd1
commit
f39fee5f11
2 changed files with 2 additions and 2 deletions
|
@ -122,7 +122,7 @@ bool should_fail(struct fault_attr *attr, ssize_t size)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (attr->probability <= random32() % 100)
|
||||
if (attr->probability <= prandom_u32() % 100)
|
||||
return false;
|
||||
|
||||
if (!fail_stacktrace(attr))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue