diff options
author | Akinobu Mita <[email protected]> | 2013-02-27 17:05:37 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2013-02-27 19:10:22 -0800 |
commit | 99672f32aa4ba0f0cc3e8a15f3c0614e63c2851b (patch) | |
tree | 15f709b6bbc2722c993514db700ba36500c9af0c | |
parent | 825b8ccb7450c805da7055a33fde032f2f0ed3ae (diff) |
mtd: mtd_speedtest: use prandom_bytes
Use prandom_bytes instead of equivalent local function.
Signed-off-by: Akinobu Mita <[email protected]>
Cc: Artem Bityutskiy <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: "Theodore Ts'o" <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: David Laight <[email protected]>
Cc: Eilon Greenstein <[email protected]>
Cc: Michel Lespinasse <[email protected]>
Cc: Robert Love <[email protected]>
Cc: Valdis Kletnieks <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | drivers/mtd/tests/mtd_speedtest.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/mtd/tests/mtd_speedtest.c b/drivers/mtd/tests/mtd_speedtest.c index 596cbea8df4c..a6ce9c1fa6c5 100644 --- a/drivers/mtd/tests/mtd_speedtest.c +++ b/drivers/mtd/tests/mtd_speedtest.c @@ -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) |