Use prandom_bytes() to generate random bytes for test data.

Signed-off-by: Akinobu Mita <akinobu.m...@gmail.com>
Cc: Dan Williams <d...@fb.com>
Cc: Vinod Koul <vinod.k...@intel.com>
---
 crypto/async_tx/raid6test.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/crypto/async_tx/raid6test.c b/crypto/async_tx/raid6test.c
index aa2b027..4a92bac 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];
        }
 }
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to