Skip to content

Commit

Permalink
raid6test: use prandom_bytes()
Browse files Browse the repository at this point in the history
Use prandom_bytes() to generate random bytes for test data.

Signed-off-by: Akinobu Mita <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Vinod Koul <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
mita authored and torvalds committed Apr 30, 2013
1 parent 713e00a commit 3ec39ab
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions crypto/async_tx/raid6test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
}
Expand Down

0 comments on commit 3ec39ab

Please sign in to comment.