函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:trigger_async_request_store

函数原型:static ssize_t trigger_async_request_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)

返回类型:ssize_t

参数:

类型参数名称
struct device *dev
struct device_attribute *attr
const char *buf
size_tcount
525  name等于kstrndup(buf, count, GFP_KERNEL)
526  如果非name则返回:负ENOSPC
529  打印信息("loading '%s'\n", name)
531  mutex_lock( & test_fw_mutex)
532  release_firmware(test_firmware)
533  test_firmware = NULL
534  rc等于request_firmware_nowait(THIS_MODULE, 1, name, dev, GFP_KERNEL, NULL, trigger_async_request_cb)
536  如果rc
537  打印信息("async load of '%s' failed: %d\n", name, rc)
538  kfree(name)
539  转到:out
542  kfree(name)
544  wait_for_completion( & async_fw_done)
546  如果test_firmware
547  打印信息("loaded: %zu\n", size)
548  rc等于count
549  否则
550  打印错误信息("failed to async load firmware\n")
551  rc等于负ENOMEM
554  out :
555  mutex_unlock( & test_fw_mutex)
557  返回:rc