diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2013-04-29 16:21:24 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-29 18:28:42 -0700 |
commit | 41d3e918e1d052521e7b0c276f18929453cdbc5b (patch) | |
tree | 4fccd17a542caa044d1b78ee6a03b16c7c4ca723 /crypto | |
parent | b45c14d1fa707c636ab2f262bdf0b1921b325cdf (diff) | |
download | linux-crypto-41d3e918e1d052521e7b0c276f18929453cdbc5b.tar.gz linux-crypto-41d3e918e1d052521e7b0c276f18929453cdbc5b.zip |
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 '')
-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 aa2b0270..4a92bac7 100644 --- a/crypto/async_tx/raid6test.c +++ b/crypto/async_tx/raid6test.c @@ -46,15 +46,10 @@ static void callback(void *param) static void makedata(int disks) { - int i, j; + int i; for (i = 0; i < disks; i++) { - for (j = 0; j < PAGE_SIZE/sizeof(u32); j += sizeof(u32)) { - u32 *p = page_address(data[i]) + j; - - *p = random32(); - } - + prandom_bytes(page_address(data[i]), PAGE_SIZE); dataptrs[i] = data[i]; } } |