From: Akinobu Mita Date: Thu, 29 Nov 2012 03:19:14 +0000 (+1100) Subject: mtd: mtd_stresstest: use prandom_bytes() X-Git-Tag: next-20121205~1^2~25 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=cb34e7726cbb7c32395a85fd28dbf68bc2d8e917;p=karo-tx-linux.git mtd: mtd_stresstest: use prandom_bytes() Signed-off-by: Akinobu 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: Andrew Morton --- diff --git a/drivers/mtd/tests/mtd_stresstest.c b/drivers/mtd/tests/mtd_stresstest.c index 3729f679ae5d..2d7e6cffd6d4 100644 --- a/drivers/mtd/tests/mtd_stresstest.c +++ b/drivers/mtd/tests/mtd_stresstest.c @@ -282,8 +282,7 @@ static int __init mtd_stresstest_init(void) } for (i = 0; i < ebcnt; i++) offsets[i] = mtd->erasesize; - for (i = 0; i < bufsize; i++) - writebuf[i] = random32(); + prandom_bytes(writebuf, bufsize); err = scan_for_bad_eraseblocks(); if (err)