From patchwork Sun Oct 28 07:19:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [8/9] mtd: mtd_speedtest: use random32_get_bytes Date: Sat, 27 Oct 2012 21:19:05 -0000 From: Akinobu Mita X-Patchwork-Id: 194653 Message-Id: <1351408746-8623-8-git-send-email-akinobu.mita@gmail.com> To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org Cc: linux-mtd@lists.infradead.org, David Woodhouse , Akinobu Mita , Artem Bityutskiy Signed-off-by: Akinobu Mita Cc: Artem Bityutskiy Cc: David Woodhouse Cc: linux-mtd@lists.infradead.org --- drivers/mtd/tests/mtd_speedtest.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/mtd/tests/mtd_speedtest.c b/drivers/mtd/tests/mtd_speedtest.c index 42b0f74..57f0383 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); + random32_get_bytes(iobuf, mtd->erasesize); err = scan_for_bad_eraseblocks(); if (err)