Home
last modified time | relevance | path

Searched refs:rs (Results 1 – 7 of 7) sorted by relevance

/lib/reed_solomon/
Dreed_solomon.c74 struct rs_codec *rs; in codec_init() local
76 rs = kzalloc(sizeof(*rs), gfp); in codec_init()
77 if (!rs) in codec_init()
80 INIT_LIST_HEAD(&rs->list); in codec_init()
82 rs->mm = symsize; in codec_init()
83 rs->nn = (1 << symsize) - 1; in codec_init()
84 rs->fcr = fcr; in codec_init()
85 rs->prim = prim; in codec_init()
86 rs->nroots = nroots; in codec_init()
87 rs->gfpoly = gfpoly; in codec_init()
[all …]
Dencode_rs.c13 struct rs_codec *rs = rsc->codec; variable
15 int nn = rs->nn;
16 int nroots = rs->nroots;
17 uint16_t *alpha_to = rs->alpha_to;
18 uint16_t *index_of = rs->index_of;
19 uint16_t *genpoly = rs->genpoly;
21 uint16_t msk = (uint16_t) rs->nn;
33 par[j] ^= alpha_to[rs_modnn(rs, fb +
40 par[nroots - 1] = alpha_to[rs_modnn(rs,
Dtest_rslib.c108 static struct wspace *alloc_ws(struct rs_codec *rs) in alloc_ws() argument
110 int nroots = rs->nroots; in alloc_ws()
112 int nn = rs->nn; in alloc_ws()
151 static int get_rcw_we(struct rs_control *rs, struct wspace *ws, in get_rcw_we() argument
154 int nroots = rs->codec->nroots; in get_rcw_we()
158 int nn = rs->codec->nn; in get_rcw_we()
170 encode_rs16(rs, c, dlen, c + dlen, 0); in get_rcw_we()
232 struct rs_codec *rs = rsc->codec; in compute_syndrome() local
233 uint16_t *alpha_to = rs->alpha_to; in compute_syndrome()
234 uint16_t *index_of = rs->index_of; in compute_syndrome()
[all …]
Ddecode_rs.c13 struct rs_codec *rs = rsc->codec; variable
16 int nn = rs->nn;
17 int nroots = rs->nroots;
18 int fcr = rs->fcr;
19 int prim = rs->prim;
20 int iprim = rs->iprim;
21 uint16_t *alpha_to = rs->alpha_to;
22 uint16_t *index_of = rs->index_of;
26 uint16_t msk = (uint16_t) rs->nn;
72 alpha_to[rs_modnn(rs, index_of[syn[i]] +
[all …]
/lib/
Dratelimit.c27 int ___ratelimit(struct ratelimit_state *rs, const char *func) in ___ratelimit() argument
32 if (!rs->interval) in ___ratelimit()
41 if (!raw_spin_trylock_irqsave(&rs->lock, flags)) in ___ratelimit()
44 if (!rs->begin) in ___ratelimit()
45 rs->begin = jiffies; in ___ratelimit()
47 if (time_is_before_jiffies(rs->begin + rs->interval)) { in ___ratelimit()
48 if (rs->missed) { in ___ratelimit()
49 if (!(rs->flags & RATELIMIT_MSG_ON_RELEASE)) { in ___ratelimit()
52 func, rs->missed); in ___ratelimit()
53 rs->missed = 0; in ___ratelimit()
[all …]
Dtest_hexdump.c74 int gs = groupsize, rs = rowsize; in test_hexdump_prepare_test() local
78 if (rs != 16 && rs != 32) in test_hexdump_prepare_test()
79 rs = 16; in test_hexdump_prepare_test()
81 if (l > rs) in test_hexdump_prepare_test()
82 l = rs; in test_hexdump_prepare_test()
114 } while (p < test + rs * 2 + rs / gs + 1); in test_hexdump_prepare_test()
166 int rs = rowsize, gs = groupsize; in test_hexdump_overflow() local
174 r = hex_dump_to_buffer(data_b, len, rs, gs, buf, buflen, ascii); in test_hexdump_overflow()
180 ae = rs * 2 /* hex */ + rs / gs /* spaces */ + 1 /* space */ + len /* ascii */; in test_hexdump_overflow()
190 test_hexdump_prepare_test(len, rs, gs, test, sizeof(test), ascii); in test_hexdump_overflow()
[all …]
/lib/crypto/
Ddes.c65 static const u8 rs[256] = { variable
634 pe[15 * 2 + 0] = DES_PC2(a, b, c, d); d = rs[d]; in des_ekey()
635 pe[14 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b]; in des_ekey()
636 pe[13 * 2 + 0] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d]; in des_ekey()
637 pe[12 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b]; in des_ekey()
638 pe[11 * 2 + 0] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d]; in des_ekey()
639 pe[10 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; b = rs[b]; in des_ekey()
640 pe[ 9 * 2 + 0] = DES_PC2(b, c, d, a); a = rs[a]; d = rs[d]; in des_ekey()
641 pe[ 8 * 2 + 0] = DES_PC2(d, a, b, c); c = rs[c]; in des_ekey()
642 pe[ 7 * 2 + 0] = DES_PC2(c, d, a, b); b = rs[b]; a = rs[a]; in des_ekey()
[all …]