Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_string.c Create Date:2022-07-28 06:25:40
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:memset16_selftest

Proto:static __init int memset16_selftest(void)

Type:int

Parameter:Nothing

12  p = kmalloc(256 * 2 * 2, GFP_KERNEL)
13  If Not p Then Return -1
16  When i < 256 cycle
17  When j < 256 cycle
18  memset(p, 0xa1, 256 * 2 * size of v )
19  memset16(p + i, 0xb1b2, j)
20  When k < 512 cycle
21  v = p[k]
22  If k < i Then
23  If v != 0xa1a1 Then Go to fail
25  Else if k < i + j Then
26  If v != 0xb1b2 Then Go to fail
28  Else
29  If v != 0xa1a1 Then Go to fail
36  fail :
37  kfree(p)
38  If i < 256 Then Return i << 24 | j << 16 | k | 0x8000
40  Return 0
Caller
NameDescribe
string_selftest_init