From 3ec39abdcc0d3099e8d8894dcbcc8c9490ee48e2 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Mon, 29 Apr 2013 16:21:24 -0700 Subject: raid6test: use prandom_bytes() Use prandom_bytes() to generate random bytes for test data. Signed-off-by: Akinobu Mita Cc: Dan Williams Cc: Vinod Koul Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- crypto/async_tx/raid6test.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'crypto/async_tx/raid6test.c') 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) 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]; } } -- cgit v1.2.3-59-g8ed1b