Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\kobject.c Create Date:2022-07-28 06:16:14
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kobject_cleanup - free kobject resources.*@kobj: object to cleanup

Proto:static void kobject_cleanup(struct kobject *kobj)

Type:void

Parameter:

TypeParameterName
struct kobject *kobj
666  t = get_ktype(kobj)
667  name = name
669  pr_debug("kobject: '%s' (%p): %s, parent %p\n", kobject_name(kobj), kobj, __func__, parent)
672  If t && Not release Then 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  If state_add_uevent_sent && Not state_remove_uevent_sent Then
678  pr_debug("kobject: '%s' (%p): auto cleanup 'remove' event\n", kobject_name(kobj), kobj)
680  kobject_uevent - notify userspace by sending an uevent*@kobj: struct kobject that the action is happening to*@action: action that is happening* Returns 0 if kobject_uevent() is completed with success or the* corresponding error when it fails.
684  If state_in_sysfs Then
685  pr_debug("kobject: '%s' (%p): auto cleanup kobject_del\n", kobject_name(kobj), kobj)
687  kobject_del() - Unlink kobject from hierarchy.*@kobj: object.* This is the function that should be called to delete an object* successfully added via kobject_add().
690  If t && release Then
691  pr_debug("kobject: '%s' (%p): calling ktype release\n", kobject_name(kobj), kobj)
693  release(kobj)
697  If name Then
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.
Caller
NameDescribe
kobject_release