函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:vert 32-bit ecc words to ecc bytes

函数原型:static void store_ecc8(struct bch_control *bch, uint8_t *dst, const uint32_t *src)

返回类型:void

参数:

类型参数名称
struct bch_control *bch
uint8_t *dst
const uint32_t *src
161  nwords等于BCH_ECC_WORDS(bch)减1
163 i小于nwords循环
164  dst自加等于src[i]右移24位
165  dst自加等于src[i]右移16位按位与0xff
166  dst自加等于src[i]右移8位按位与0xff
167  dst自加等于src[i]右移0位按位与0xff
169  pad[0]等于src[nwords]右移24位
170  pad[1]等于src[nwords]右移16位按位与0xff
171  pad[2]等于src[nwords]右移8位按位与0xff
172  pad[3]等于src[nwords]右移0位按位与0xff
173  内存复制(dst, pad, BCH_ECC_BYTES(bch) - 4 * nwords)
调用者
名称描述
encode_bchde_bch - calculate BCH ecc parity of data*@bch: BCH control structure*@data: data to encode*@len: data length in bytes*@ecc: ecc parity data, must be initialized by caller* The @ecc parity array is used both as input and output parameter, in order to