函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:next_bits

函数原型:static int next_bits(struct sw842_param *p, u64 *d, u8 n)

返回类型:int

参数:

类型参数名称
struct sw842_param *p
u64 *d
u8n
89  in等于in, b等于bit, bits等于b加n
91  如果n大于64则
92  pr_debug("next_bits invalid n %u\n", n)
93  返回:负EINVAL
99  如果bits大于64则返回:__split_next_bits(p, d, n, 32)
101  否则如果ilen小于8且bits大于32且bits小于等于56则返回:__split_next_bits(p, d, n, 16)
103  否则如果ilen小于4且bits大于16且bits小于等于24则返回:__split_next_bits(p, d, n, 8)
106  如果DIV_ROUND_UP(bits, 8)大于ilen则返回:负EOVERFLOW
109  如果bits小于等于8则d等于in右移8减bits
111  否则如果bits小于等于16则d等于be16_to_cpu(get_unaligned((__be16 * )in))右移16减bits
113  否则如果bits小于等于32则d等于be32_to_cpu(get_unaligned((__be32 * )in))右移32减bits
115  否则d等于be64_to_cpu(get_unaligned((__be64 * )in))右移64减bits
118  d与等于GENMASK_ULL(n - 1, 0)
120  bit加等于n
122  如果bit大于7则
123  in加等于bit除8
124  ilen减等于bit除8
125  bit取模等于8
128  返回:0
调用者
名称描述
__split_next_bits
do_data
__do_index
sw842_decompresssw842_decompress* Decompress the 842-compressed buffer of length @ilen at @in* to the output buffer @out, using no more than @olen bytes.* The compressed buffer must be only a single 842-compressed buffer,