Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__blk_mq_register_dev

Proto:int __blk_mq_register_dev(struct device *dev, struct request_queue *q)

Type:int

Parameter:

TypeParameterName
struct device *dev
struct request_queue *q
319  WARN_ON_ONCE(!parent)
320  lockdep_assert_held( & sysfs_dir_lock)
322  ret = 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.
323  If ret < 0 Then Go to out
326  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.
329  ret = blk_mq_register_hctx(hctx)
330  If ret Then Go to unreg
334  mq_sysfs_init_done = true
336  out :
337  Return ret
339  unreg :
340  When --i >= 0 cycle
341  blk_mq_unregister_hctx( hw dispatch queues [i])
343  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.
344  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().
345  kobject_put() - Decrement refcount for object.*@kobj: object.* Decrement the refcount, and if 0, call kobject_cleanup().
346  Return ret