Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:_rs_internal - Allocate rs control, find a matching codec or allocate a new one*@symsize: the symbol size (number of bits)*@gfpoly: the extended Galois field generator polynomial coefficients,* with the 0th coefficient in the low order bit

Proto:static struct rs_control *init_rs_internal(int symsize, int gfpoly, int (*gffunc)(int ), int fcr, int prim, int nroots, gfp_t gfp)

Type:struct rs_control

Parameter:

TypeParameterName
intsymsize
intgfpoly
int (*gffunc
intfcr
intprim
intnroots
gfp_tgfp
222  If symsize < 1 Then Return NULL
224  If fcr < 0 || fcr >= 1 << symsize Then Return NULL
226  If prim <= 0 || prim >= 1 << symsize Then Return NULL
228  If nroots < 0 || nroots >= 1 << symsize Then Return NULL
236  bsize = sizeof(uint16_t) * RS_DECODE_NUM_BUFFERS * (nroots + 1)
237  rs = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
238  If Not rs Then Return NULL
241  mutex_lock( & Protection for the list )
245  cd = list_entry - get the struct for this entry*@ptr: the &struct list_head pointer.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.(tmp, structrs_codec, list)
247  If symsize != mm Then Continue
249  If gfpoly != gfpoly Then Continue
251  If gffunc != gffunc Then Continue
253  If fcr != fcr Then Continue
255  If prim != prim Then Continue
257  If nroots != nroots Then Continue
260  users++
261  codec = cd
262  Go to out
266  codec = dec_init - Initialize a Reed-Solomon codec*@symsize: symbol size, bits (1-8)*@gfpoly: Field generator polynomial coefficients*@gffunc: Field generator function*@fcr: first root of RS code generator polynomial, index form*@prim: primitive element to
267  If Not codec Then
268  kfree(rs)
269  rs = NULL
271  out :
272  mutex_unlock( & Protection for the list )
273  Return rs
Caller
NameDescribe
init_rs_gfp_rs_gfp - Create a RS control struct and initialize it*@symsize: the symbol size (number of bits)*@gfpoly: the extended Galois field generator polynomial coefficients,* with the 0th coefficient in the low order bit
init_rs_non_canonical_rs_non_canonical - Allocate rs control struct for fields with* non-canonical representation*@symsize: the symbol size (number of bits)*@gffunc: pointer to function to generate the next field element,* or the multiplicative identity element if given 0