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

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 <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 825b8ccb
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -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)