函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: 释放kobj's资源

函数原型:static void kobject_cleanup(struct kobject *kobj)

返回类型:void

参数:

类型参数名称
struct kobject *kobj
666  t等于get_ktype(kobj)
667  name等于设备对象名称
669  pr_debug("kobject: '%s' (%p): %s, parent %p\n", kobject_name(kobj), kobj, __func__, 父设备指针)
672  如果t且非注销设备调用函数pr_debug("kobject: '%s' (%p): does not have a release() function, it is broken and must be fixed. See Documentation/kobject.txt.\n", kobject_name(kobj), kobj)
677  如果state_add_uevent_sent且非state_remove_uevent_sent
678  pr_debug("kobject: '%s' (%p): auto cleanup 'remove' event\n", kobject_name(kobj), kobj)
680  通过发送一个uevent通知用户空间
684  如果state_in_sysfs
685  pr_debug("kobject: '%s' (%p): auto cleanup kobject_del\n", kobject_name(kobj), kobj)
687  解除对象
690  如果t注销设备调用函数
691  pr_debug("kobject: '%s' (%p): calling ktype release\n", kobject_name(kobj), kobj)
693  注销设备调用函数(kobj)
697  如果name
698  pr_debug("kobject: '%s': free name\n", name)
699  kfree_const - conditionally free memory*@x: pointer to the memory* Function calls kfree only if @x is not in .rodata section.
调用者
名称描述
kobject_release