diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2013-04-29 19:21:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 21:28:42 -0400 |
commit | 3ec39abdcc0d3099e8d8894dcbcc8c9490ee48e2 (patch) | |
tree | e8e70212eda26e68c658079d15b7c38ea00285ad /crypto/async_tx | |
parent | 713e00a324e49e8adee2753e1bb7bc3806bb53b6 (diff) |
raid6test: use prandom_bytes()
Use prandom_bytes() to generate random bytes for test data.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Dan Williams <djbw@fb.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'crypto/async_tx')
-rw-r--r-- | crypto/async_tx/raid6test.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/crypto/async_tx/raid6test.c b/crypto/async_tx/raid6test.c index aa2b0270ed16..4a92bac744dc 100644 --- a/crypto/async_tx/raid6test.c +++ b/crypto/async_tx/raid6test.c | |||
@@ -46,15 +46,10 @@ static void callback(void *param) | |||
46 | 46 | ||
47 | static void makedata(int disks) | 47 | static void makedata(int disks) |
48 | { | 48 | { |
49 | int i, j; | 49 | int i; |
50 | 50 | ||
51 | for (i = 0; i < disks; i++) { | 51 | for (i = 0; i < disks; i++) { |
52 | for (j = 0; j < PAGE_SIZE/sizeof(u32); j += sizeof(u32)) { | 52 | prandom_bytes(page_address(data[i]), PAGE_SIZE); |
53 | u32 *p = page_address(data[i]) + j; | ||
54 | |||
55 | *p = random32(); | ||
56 | } | ||
57 | |||
58 | dataptrs[i] = data[i]; | 53 | dataptrs[i] = data[i]; |
59 | } | 54 | } |
60 | } | 55 | } |