Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Akinobu Mita and committed by
Linus Torvalds
3ec39abd 713e00a3

+2 -7
+2 -7
crypto/async_tx/raid6test.c
··· 46 46 47 47 static void makedata(int disks) 48 48 { 49 - int i, j; 49 + int i; 50 50 51 51 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); 58 53 dataptrs[i] = data[i]; 59 54 } 60 55 }