[PATCH 01/29] raid6test: use prandom_bytes()

From: Akinobu Mita
Date: Sun Dec 23 2012 - 21:14:33 EST


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

Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
Cc: Dan Williams <djbw@xxxxxx>
Cc: Vinod Koul <vinod.koul@xxxxxxxxx>
---
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/