Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:test_sort_init

Proto:static int __init test_sort_init(void)

Type:int

Parameter:Nothing

17  r = 1 , err = -ENOMEM
19  a = kmalloc_array - allocate memory for an array.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc).
20  If Not a Then Return err
23  When i < a simple boot-time regression test cycle
24  r = r * 725861 % 6599
25  a[i] = r
28  sort(a, a simple boot-time regression test , size of a , cmpint, NULL)
30  err = -EINVAL
31  When i < a simple boot-time regression test - 1 cycle If a[i] > a[i + 1] Then
33  pr_err("test has failed\n")
34  Go to exit
36  err = 0
37  pr_info("test passed\n")
38  exit :
39  kfree(a)
40  Return err