Commit 99672f32 authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds
Browse files

mtd: mtd_speedtest: use prandom_bytes

Use prandom_bytes instead of equivalent local function.
Signed-off-by: default avatarAkinobu Mita <>
Cc: Artem Bityutskiy <>
Cc: David Woodhouse <>
Cc: "Theodore Ts'o" <>
Cc: Adrian Hunter <>
Cc: David Laight <>
Cc: Eilon Greenstein <>
Cc: Michel Lespinasse <>
Cc: Robert Love <>
Cc: Valdis Kletnieks <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 825b8ccb
......@@ -49,13 +49,6 @@ static int pgcnt;
static int goodebcnt;
static struct timeval start, finish;
static void set_random_data(unsigned char *buf, size_t len)
size_t i;
for (i = 0; i < len; ++i)
buf[i] = random32();
static int erase_eraseblock(int ebnum)
......@@ -396,7 +389,7 @@ static int __init mtd_speedtest_init(void)
goto out;
set_random_data(iobuf, mtd->erasesize);
prandom_bytes(iobuf, mtd->erasesize);
err = scan_for_bad_eraseblocks();
if (err)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment