函数逻辑报告

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 ecc bytes to aligned, zero-padded 32-bit ecc words

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

返回类型:void

参数:

类型参数名称
struct bch_control *bch
uint32_t *dst
const uint8_t *src
144  uint8_t pad[4] = {0, 0, 0, 0}
145  nwords等于BCH_ECC_WORDS(bch)减1
147 i小于nwords循环dst[i]等于src[0]左移24位按位或src[1]左移16位按位或src[2]左移8位按位或src[3]
150  内存复制(pad, src, BCH_ECC_BYTES(bch) - 4 * nwords)
151  dst[nwords]等于pad[0]左移24位按位或pad[1]左移16位按位或pad[2]左移8位按位或pad[3]
调用者
名称描述
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
decode_bchdecode_bch - decode received codeword and find bit error locations*@bch: BCH control structure*@data: received data, ignored if @calc_ecc is provided*@len: data length in bytes, must always be provided*@recv_ecc: received ecc, if NULL then assume it was