Skip to content

Commit

Permalink
mtd: mtd_nandecctest: use prandom_bytes instead of get_random_bytes()
Browse files Browse the repository at this point in the history
Using prandom_bytes() is enough.  Because this data is only used
for testing, not used for cryptographic use.

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>
  • Loading branch information
mita authored and torvalds committed Feb 28, 2013
1 parent bf53153 commit 459a86d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/tests/mtd_nandecctest.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static int nand_ecc_test_run(const size_t size)
goto error;
}

get_random_bytes(correct_data, size);
prandom_bytes(correct_data, size);
__nand_calculate_ecc(correct_data, size, correct_ecc);

for (i = 0; i < ARRAY_SIZE(nand_ecc_test); i++) {
Expand Down

0 comments on commit 459a86d

Please sign in to comment.