函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:read_firmware_show

函数原型:static ssize_t read_firmware_show(struct device *dev, struct device_attribute *attr, char *buf)

返回类型:ssize_t

参数:

类型参数名称
struct device *dev
struct device_attribute *attr
char *buf
850  rc等于0
852  mutex_lock( & test_fw_mutex)
854  idx等于read_fw_idx
855  如果idx大于等于num_requests
856  rc等于负ERANGE
857  转到:out
860  如果非These below don't belong her but we'll move them once we create* a struct fw_test_device and stuff the misc_dev under there later.
861  rc等于负EINVAL
862  转到:out
865  req等于These below don't belong her but we'll move them once we create* a struct fw_test_device and stuff the misc_dev under there later.[idx]
866  如果非fw
867  打印错误信息("#%u: failed to async load firmware\n", idx)
868  rc等于负ENOENT
869  转到:out
872  打印信息("#%u: loaded %zu\n", idx, size)
874  如果size大于PAGE_SIZE
875  打印错误信息("Testing interface must use PAGE_SIZE firmware for now\n")
876  rc等于负EINVAL
877  转到:out
879  内存复制(buf, data, size)
881  rc等于size
882  out :
883  mutex_unlock( & test_fw_mutex)
885  返回:rc