Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\bch.c Create Date:2022-07-28 06:59:36
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:same as encode_bch(), but process input data one byte at a time

Proto:static void encode_bch_unaligned(struct bch_control *bch, const unsigned char *data, unsigned int len, uint32_t *ecc)

Type:void

Parameter:

TypeParameterName
struct bch_control *bch
const unsigned char *data
unsigned intlen
uint32_t *ecc
126  l = BCH_ECC_WORDS(bch) - 1
128  When len-- cycle
129  p = mod8_tab + (l + 1) * (( ecc[0] >> 24 ^ data++) & 0xff)
131  When i < l cycle ecc[i] = ( ecc[i] << 8 | ecc[i + 1] >> 24 ) ^ p++
134  ecc[l] = ecc[l] << 8 ^ p
Caller
NameDescribe
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