Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4debec7a authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds
Browse files

mtd: mtd_stresstest: use prandom_bytes()



Signed-off-by: default avatarAkinobu 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a312b78b
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -282,8 +282,7 @@ static int __init mtd_stresstest_init(void)
	}
	}
	for (i = 0; i < ebcnt; i++)
	for (i = 0; i < ebcnt; i++)
		offsets[i] = mtd->erasesize;
		offsets[i] = mtd->erasesize;
	for (i = 0; i < bufsize; i++)
	prandom_bytes(writebuf, bufsize);
		writebuf[i] = random32();


	err = scan_for_bad_eraseblocks();
	err = scan_for_bad_eraseblocks();
	if (err)
	if (err)