mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 04:42:12 +00:00
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>
This commit is contained in:
parent
713e00a324
commit
3ec39abdcc
@ -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];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user