函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_kmod.c Create Date:2022-07-27 07:32:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:register_test_dev_kmod

函数原型:static struct kmod_test_device *register_test_dev_kmod(void)

返回类型:struct kmod_test_device

参数:

1139  struct kmod_test_device * test_dev = NULL
1142  mutex_lock( & For device allocation / registration)
1145  如果um_test_devs actually represents the *next* ID of the next* device we will allow to create.加1恒等于INT_MAX
1146  打印错误信息("reached limit of number of test devices\n")
1147  转到:out
1150  test_dev等于alloc_test_dev_kmod(um_test_devs actually represents the *next* ID of the next* device we will allow to create.)
1151  如果非test_dev则转到:out
1154  ret等于注册一个设备
1155  如果ret
1156  打印错误信息("could not register misc device: %d\n", ret)
1157  free_test_dev_kmod(test_dev)
1158  转到:out
1161  dev等于this_device
1162  添加链表项
1163  dev_info(dev, "interface ready\n")
1165  um_test_devs actually represents the *next* ID of the next* device we will allow to create.自加
1167  out :
1168  mutex_unlock( & For device allocation / registration)
1170  返回:test_dev
调用者
名称描述
test_kmod_init