函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:struct kobject *kobject_create_and_add(const char *name, struct kobject *parent)

返回类型:struct kobject

参数:

类型参数名称
const char *name
struct kobject *parent
796  kobj等于kobject_create() - Create a struct kobject dynamically.* This function creates a kobject structure dynamically and sets it up* to be a "dynamic" kobject with a default release function set up.
797  如果非kobj则返回:NULL
800  retval等于kobject_add() - The main kobject add function.*@kobj: the kobject to add*@parent: pointer to the parent of the kobject.*@fmt: format to name the kobject with.* The kobject name is set and added to the kobject hierarchy in this* function.
801  如果retval
802  打印警告信息("%s: kobject_add error: %d\n", __func__, retval)
803  递减引用计数对象
804  kobj = NULL
806  返回:kobj
调用者
名称描述
create_setup_data_nodes
boot_params_ksysfs_init
threshold_create_bank
pm_init
klp_init
preemptirq_delay_init
btf_vmlinux_init
hugetlb_sysfs_add_hstate
hugetlb_sysfs_init
hugetlb_register_nodeRegister hstate attributes for a single node device.* No-op if attributes already registered.
register_disk
genhd_device_init
add_partitionMust be called either with bd_mutex held, before a disk can be opened or* after all disk users are gone.
create_setup_data_node
ksysfs_init
mm_sysfs_init
mnt_init