aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2013-02-27 20:05:37 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-27 22:10:22 -0500
commit99672f32aa4ba0f0cc3e8a15f3c0614e63c2851b (patch)
tree15f709b6bbc2722c993514db700ba36500c9af0c
parent825b8ccb7450c805da7055a33fde032f2f0ed3ae (diff)
mtd: mtd_speedtest: use prandom_bytes
Use prandom_bytes instead of equivalent local function. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Artem Bityutskiy <dedekind1@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Laight <david.laight@aculab.com> Cc: Eilon Greenstein <eilong@broadcom.com> Cc: Michel Lespinasse <walken@google.com> Cc: Robert Love <robert.w.love@intel.com> Cc: Valdis Kletnieks <valdis.kletnieks@vt.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/mtd/tests/mtd_speedtest.c9
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;
49static int goodebcnt; 49static int goodebcnt;
50static struct timeval start, finish; 50static struct timeval start, finish;
51 51
52static void set_random_data(unsigned char *buf, size_t len)
53{
54 size_t i;
55
56 for (i = 0; i < len; ++i)
57 buf[i] = random32();
58}
59 52
60static int erase_eraseblock(int ebnum) 53static int erase_eraseblock(int ebnum)
61{ 54{
@@ -396,7 +389,7 @@ static int __init mtd_speedtest_init(void)
396 goto out; 389 goto out;
397 } 390 }
398 391
399 set_random_data(iobuf, mtd->erasesize); 392 prandom_bytes(iobuf, mtd->erasesize);
400 393
401 err = scan_for_bad_eraseblocks(); 394 err = scan_for_bad_eraseblocks();
402 if (err) 395 if (err)