函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:trigger_custom_fallback_store

函数原型:static ssize_t trigger_custom_fallback_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
568  name等于kstrndup(buf, count, GFP_KERNEL)
569  如果非name则返回:负ENOSPC
572  打印信息("loading '%s' using custom fallback mechanism\n", name)
574  mutex_lock( & test_fw_mutex)
575  release_firmware(test_firmware)
576  test_firmware = NULL
577  rc等于request_firmware_nowait(THIS_MODULE, FW_ACTION_NOHOTPLUG, name, dev, GFP_KERNEL, NULL, trigger_async_request_cb)
580  如果rc
581  打印信息("async load of '%s' failed: %d\n", name, rc)
582  kfree(name)
583  转到:out
586  kfree(name)
588  wait_for_completion( & async_fw_done)
590  如果test_firmware
591  打印信息("loaded: %zu\n", size)
592  rc等于count
593  否则
594  打印错误信息("failed to async load firmware\n")
595  rc等于负ENODEV
598  out :
599  mutex_unlock( & test_fw_mutex)
601  返回:rc