Skip to content

Commit 3ec39ab

Browse files
mitatorvalds
authored andcommitted
raid6test: use prandom_bytes()
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>
1 parent 713e00a commit 3ec39ab

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

‎crypto/async_tx/raid6test.c‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,10 @@ static void callback(void *param)
4646

4747
static void makedata(int disks)
4848
{
49-
int i, j;
49+
int i;
5050

5151
for (i = 0; i < disks; i++) {
52-
for (j = 0; j < PAGE_SIZE/sizeof(u32); j += sizeof(u32)) {
53-
u32 *p = page_address(data[i]) + j;
54-
55-
*p = random32();
56-
}
57-
52+
prandom_bytes(page_address(data[i]), PAGE_SIZE);
5853
dataptrs[i] = data[i];
5954
}
6055
}

0 commit comments

Comments
 (0)