raid6test: use prandom_bytes()
authorAkinobu Mita <akinobu.mita@gmail.com>
Mon, 29 Apr 2013 23:21:24 +0000 (16:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 30 Apr 2013 01:28:42 +0000 (18:28 -0700)
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>
crypto/async_tx/raid6test.c

index aa2b027..4a92bac 100644 (file)
@@ -46,15 +46,10 @@ static void callback(void *param)
 
 static void makedata(int disks)
 {
 
 static void makedata(int disks)
 {
-       int i, j;
+       int i;
 
        for (i = 0; i < disks; 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];
        }
 }
                dataptrs[i] = data[i];
        }
 }