函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:int kobject_add(struct kobject *kobj, struct kobject *parent, const char *fmt, ...)

返回类型:int

参数:

类型参数名称
struct kobject *kobj
struct kobject *parent
const char *fmt
432  如果非kobj则返回:负EINVAL
435  如果非state_initialized
436  打印错误信息("kobject '%s' (%p): tried to add an uninitialized object, something is seriously wrong.\n", kobject_name(kobj), kobj)
438  dump_stack()
439  返回:负EINVAL
441  va_start(args, fmt)
442  retval等于kobject_add_varg(kobj, parent, fmt, args)
443  va_end(args)
445  返回:retval
调用者
名称描述
kobject_create_and_addkobject_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
__threshold_add_blocks
threshold_create_bank
klp_init_object
klp_init_patch
blk_register_queuelk_register_queue - register a block layer queue with sysfs*@disk: Disk of which the request queue should be registered with sysfs.
blk_mq_register_hctx
__blk_mq_register_dev
klp_init_func
elv_register_queuelv_register_queue is called from either blk_register_queue or* elevator_switch, elevator switch is prevented from being happen* in the two paths, so it is safe to not hold q->sysfs_lock.