函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__blk_mq_register_dev

函数原型:int __blk_mq_register_dev(struct device *dev, struct request_queue *q)

返回类型:int

参数:

类型参数名称
struct device *dev
struct request_queue *q
319  WARN_ON_ONCE(!父设备指针)
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  如果ret小于0则转到:out
326  通过发送一个uevent通知用户空间
329  ret等于blk_mq_register_hctx(hctx)
330  如果ret则转到:unreg
334  mq_sysfs_init_done = true
336  out :
337  返回:ret
339  unreg :
340 i先自减大于等于0循环
341  blk_mq_unregister_hctx( hw dispatch queues [i])
343  通过发送一个uevent通知用户空间
344  解除对象
345  递减引用计数对象
346  返回:ret