Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:generate Galois field lookup tables

Proto:static int build_gf_tables(struct bch_control *bch, unsigned int poly)

Type:int

Parameter:

TypeParameterName
struct bch_control *bch
unsigned intpoly
1063  x = 1
1064  k = 1 << deg(poly)
1067  If k != 1u << GF_M(bch) Then Return -1
1070  When i < GF_N(bch) cycle
1071  private: [i] = x
1072  a_log_tab[x] = i
1073  If i && x == 1 Then Return -1
1076  x <<= 1
1077  If x & k Then x ^= poly
1080  private: [GF_N(bch)] = 1
1081  a_log_tab[0] = 0
1083  Return 0
Caller
NameDescribe
init_bch_bch - initialize a BCH encoder/decoder*@m: Galois field order, should be in the range 5-15*@t: maximum error correction capability, in bits*@prim_poly: user-provided primitive polynomial (or 0 to use default)* Returns:* a newly allocated BCH control