函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\ksysfs.c Create Date:2022-07-27 08:42:29
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:create_setup_data_nodes

函数原型:static int __init create_setup_data_nodes(struct kobject *parent)

返回类型:int

参数:

类型参数名称
struct kobject *parent
286  ret等于0
288  pa_data等于安装数据地址
289  如果非pa_data则返回:0
292  setup_data_kobj等于kobject_create_and_add() - Create a struct kobject dynamically and* register it with sysfs.*@name: the name for the kobject*@parent: the parent kobject of this kobject, if any.* This function creates a kobject structure dynamically and registers it
293  如果非setup_data_kobj
294  ret等于负ENOMEM
295  转到:out
298  ret等于get_setup_data_total_num(pa_data, & nr)
299  如果ret则转到:out_setup_data_kobj
302  kobjp等于分配数组内存
303  如果非kobjp
304  ret等于负ENOMEM
305  转到:out_setup_data_kobj
308 i小于nr循环
309  ret等于create_setup_data_node(setup_data_kobj, kobjp + i, i)
310  如果ret则转到:out_clean_nodes
314  释放内存
315  返回:0
317  out_clean_nodes :
318 j大于等于0循环cleanup_setup_data_node( * (kobjp + j))
320  释放内存
321  out_setup_data_kobj :
322  递减引用计数对象
323  out :
324  返回:ret
调用者
名称描述
boot_params_ksysfs_init