Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:create_setup_data_node

Proto:static int __init create_setup_data_node(struct kobject *parent, struct kobject **kobjp, int nr)

Type:int

Parameter:

TypeParameterName
struct kobject *parent
struct kobject **kobjp
intnr
229  ret = 0
233  snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
235  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
236  If Not kobj Then Return -ENOMEM
239  ret = get_setup_data_size(nr, & size)
240  If ret Then Go to out_kobj
243  size = size
244  ret = sysfs_create_group(kobj, & setup_data_attr_group)
245  If ret Then Go to out_kobj
247  kobjp = kobj
249  Return 0
250  out_kobj :
251  kobject_put() - Decrement refcount for object.*@kobj: object.* Decrement the refcount, and if 0, call kobject_cleanup().
252  Return ret
Caller
NameDescribe
create_setup_data_nodes