Lines Matching refs:r
190 uint32_t w, r[l+1]; in encode_bch() local
201 memset(bch->ecc_buf, 0, sizeof(r)); in encode_bch()
218 memcpy(r, bch->ecc_buf, sizeof(r)); in encode_bch()
233 w = r[0]^cpu_to_be32(*pdata++); in encode_bch()
240 r[i] = r[i+1]^p0[i]^p1[i]^p2[i]^p3[i]; in encode_bch()
242 r[l] = p0[l]^p1[l]^p2[l]^p3[l]; in encode_bch()
244 memcpy(bch->ecc_buf, r, sizeof(r)); in encode_bch()
437 int rem, c, r, p, k, param[m]; in solve_linear_system() local
447 for (r = p; r < m; r++) { in solve_linear_system()
448 if (rows[r] & mask) { in solve_linear_system()
449 if (r != p) { in solve_linear_system()
450 tmp = rows[r]; in solve_linear_system()
451 rows[r] = rows[p]; in solve_linear_system()
454 rem = r+1; in solve_linear_system()
461 for (r = rem; r < m; r++) { in solve_linear_system()
462 if (rows[r] & mask) in solve_linear_system()
463 rows[r] ^= tmp; in solve_linear_system()
474 for (r = m-1; r >= 0; r--) { in solve_linear_system()
475 if ((r > m-1-k) && rows[r]) in solve_linear_system()
479 rows[r] = (p && (r == param[p-1])) ? in solve_linear_system()
480 p--, 1u << (m-r) : rows[r-p]; in solve_linear_system()
495 for (r = m-1; r >= 0; r--) { in solve_linear_system()
496 mask = rows[r] & (tmp|1); in solve_linear_system()
497 tmp |= parity(mask) << (m-r); in solve_linear_system()
564 unsigned int u, v, r; in find_poly_deg2_roots() local
580 r = 0; in find_poly_deg2_roots()
584 r ^= bch->xi_tab[i]; in find_poly_deg2_roots()
588 if ((gf_sqr(bch, r)^r) == u) { in find_poly_deg2_roots()
591 bch->a_log_tab[r]+l2); in find_poly_deg2_roots()
593 bch->a_log_tab[r^1]+l2); in find_poly_deg2_roots()
1116 int i, j, r; in build_deg2_base() local
1136 r = a_log(bch, y); in build_deg2_base()
1137 if (y && (r < m) && !xi[r]) { in build_deg2_base()
1138 bch->xi_tab[r] = x; in build_deg2_base()
1139 xi[r] = 1; in build_deg2_base()
1141 dbg("x%d = %x\n", r, x); in build_deg2_base()
1169 unsigned int i, j, nbits, r, word, *roots; in compute_generator_polynomial() local
1186 for (j = 0, r = 2*i+1; j < m; j++) { in compute_generator_polynomial()
1187 roots[r] = 1; in compute_generator_polynomial()
1188 r = mod_s(bch, 2*r); in compute_generator_polynomial()
1197 r = bch->a_pow_tab[i]; in compute_generator_polynomial()
1200 g->c[j] = gf_mul(bch, g->c[j], r)^g->c[j-1]; in compute_generator_polynomial()
1202 g->c[0] = gf_mul(bch, g->c[0], r); in compute_generator_polynomial()