/lib/reed_solomon/ |
D | decode_rs.c | 21 int i, j, r, k, pad; variable 46 for (i = 0; i < nroots; i++) { 50 if (s[i] != nn) 60 for (i = 0; i < nroots; i++) 61 syn[i] = (((uint16_t) data[0]) ^ invmsk) & msk; 64 for (i = 0; i < nroots; i++) { 65 if (syn[i] == 0) { 66 syn[i] = (((uint16_t) data[j]) ^ 69 syn[i] = ((((uint16_t) data[j]) ^ 71 alpha_to[rs_modnn(rs, index_of[syn[i]] + [all …]
|
/lib/ |
D | crc32test.c | 666 int i; in crc32c_test() local 677 for (i = 0; i < 100; i++) { in crc32c_test() 678 bytes += 2*test[i].length; in crc32c_test() 680 crc ^= __crc32c_le(test[i].crc, test_buf + in crc32c_test() 681 test[i].start, test[i].length); in crc32c_test() 689 for (i = 0; i < 100; i++) { in crc32c_test() 690 if (test[i].crc32c_le != __crc32c_le(test[i].crc, test_buf + in crc32c_test() 691 test[i].start, test[i].length)) in crc32c_test() 713 int i, j; in crc32c_combine_test() local 716 for (i = 0; i < 10; i++) { in crc32c_combine_test() [all …]
|
D | build_OID_registry | 53 for (my $i = 0; $i <= $#names; $i++) { 54 my $name = $names[$i]; 55 my $oid = $oids[$i]; 83 for (my $i = 0; $i <= $#names; $i++) { 84 print C_FILE "\t[OID_", $names[$i], "] = ", $indices[$i], ",\n" 94 for (my $i = 0; $i <= $#names; $i++) { 97 my @components = split(/[.]/, $oids[$i]); 121 for (my $i = 0; $i <= $#names; $i++) { 122 my @octets = @{$encoded_oids[$i]}; 139 for (my $i = 0; $i <= $#names; $i++) { [all …]
|
D | decompress_bunzip2.c | 161 i, j, k, t, runPos, symCount, symTotal, nSelectors, *byteCount; in get_next_block() local 174 i = get_bits(bd, 24); in get_next_block() 177 if ((i == 0x177245) && (j == 0x385090)) in get_next_block() 179 if ((i != 0x314159) || (j != 0x265359)) in get_next_block() 196 for (i = 0; i < 16; i++) { in get_next_block() 197 if (t&(1 << (15-i))) { in get_next_block() 201 symToByte[symTotal++] = (16*i)+j; in get_next_block() 216 for (i = 0; i < groupCount; i++) in get_next_block() 217 mtfSymbol[i] = i; in get_next_block() 218 for (i = 0; i < nSelectors; i++) { in get_next_block() [all …]
|
D | btree.c | 105 size_t i; in longcmp() local 107 for (i = 0; i < n; i++) { in longcmp() 108 if (l1[i] < l2[i]) in longcmp() 110 if (l1[i] > l2[i]) in longcmp() 119 size_t i; in longcpy() local 121 for (i = 0; i < n; i++) in longcpy() 122 dest[i] = src[i]; in longcpy() 128 size_t i; in longset() local 130 for (i = 0; i < n; i++) in longset() 131 s[i] = c; in longset() [all …]
|
D | ts_bm.c | 65 unsigned int i, text_len, consumed = state->offset; in bm_find() local 79 for (i = 0; i < bm->patlen; i++) in bm_find() 80 if ((icase ? toupper(text[shift-i]) in bm_find() 81 : text[shift-i]) in bm_find() 82 != bm->pattern[bm->patlen-1-i]) in bm_find() 89 next: bs = bm->bad_shift[text[shift-i]]; in bm_find() 92 shift = max_t(int, shift-i+bs, shift+bm->good_shift[i]); in bm_find() 100 static int subpattern(u8 *pattern, int i, int j, int g) in subpattern() argument 102 int x = i+g-1, y = j+g-1, ret = 0; in subpattern() 110 ret = pattern[i-1] != pattern[j-1]; in subpattern() [all …]
|
D | iov_iter.c | 12 #define iterate_iovec(i, n, __v, __p, skip, STEP) { \ argument 15 __p = i->iov; \ 40 #define iterate_kvec(i, n, __v, __p, skip, STEP) { \ argument 42 __p = i->kvec; \ 63 #define iterate_bvec(i, n, __v, __bi, skip, STEP) { \ argument 68 for_each_bvec(__v, i->bvec, __bi, __start) { \ 75 #define iterate_all_kinds(i, n, v, I, B, K) { \ argument 77 size_t skip = i->iov_offset; \ 78 if (unlikely(i->type & ITER_BVEC)) { \ 81 iterate_bvec(i, n, v, __bi, skip, (B)) \ [all …]
|
D | test_rhashtable.c | 112 unsigned int i; in test_rht_lookup() local 114 for (i = 0; i < entries * 2; i++) { in test_rht_lookup() 116 bool expected = !(i % 2); in test_rht_lookup() 118 .id = i, in test_rht_lookup() 121 if (array[i / 2].value.id == TEST_INSERT_FAIL) in test_rht_lookup() 134 if (obj->value.id != i) { in test_rht_lookup() 136 obj->value.id, i); in test_rht_lookup() 193 unsigned int i, insert_retries = 0; in test_rhashtable() local 202 for (i = 0; i < entries; i++) { in test_rhashtable() 203 struct test_obj *obj = &array[i]; in test_rhashtable() [all …]
|
D | gen_crc32table.c | 39 unsigned i, j; in crc32init_le_generic() local 44 for (i = LE_TABLE_SIZE >> 1; i; i >>= 1) { in crc32init_le_generic() 46 for (j = 0; j < LE_TABLE_SIZE; j += 2 * i) in crc32init_le_generic() 47 tab[0][i + j] = crc ^ tab[0][j]; in crc32init_le_generic() 49 for (i = 0; i < LE_TABLE_SIZE; i++) { in crc32init_le_generic() 50 crc = tab[0][i]; in crc32init_le_generic() 53 tab[j][i] = crc; in crc32init_le_generic() 73 unsigned i, j; in crc32init_be() local 78 for (i = 1; i < BE_TABLE_SIZE; i <<= 1) { in crc32init_be() 80 for (j = 0; j < i; j++) in crc32init_be() [all …]
|
D | cmdline.c | 92 int res, i = 1; in get_options() local 94 while (i < nints) { in get_options() 95 res = get_option((char **)&str, ints + i); in get_options() 100 range_nums = get_range((char **)&str, ints + i, nints - i); in get_options() 108 i += (range_nums - 1); in get_options() 110 i++; in get_options() 114 ints[0] = i - 1; in get_options() 201 unsigned int i, equals = 0; in next_arg() local 211 for (i = 0; args[i]; i++) { in next_arg() 212 if (isspace(args[i]) && !in_quote) in next_arg() [all …]
|
D | sbitmap.c | 27 unsigned int i; in sbitmap_init_node() local 59 for (i = 0; i < sb->map_nr; i++) { in sbitmap_init_node() 60 sb->map[i].depth = min(depth, bits_per_word); in sbitmap_init_node() 61 depth -= sb->map[i].depth; in sbitmap_init_node() 70 unsigned int i; in sbitmap_resize() local 75 for (i = 0; i < sb->map_nr; i++) { in sbitmap_resize() 76 sb->map[i].depth = min(depth, bits_per_word); in sbitmap_resize() 77 depth -= sb->map[i].depth; in sbitmap_resize() 116 unsigned int i, index; in sbitmap_get() local 121 for (i = 0; i < sb->map_nr; i++) { in sbitmap_get() [all …]
|
D | net_utils.c | 9 int i; in mac_pton() local 16 for (i = 0; i < ETH_ALEN; i++) { in mac_pton() 17 if (!isxdigit(s[i * 3]) || !isxdigit(s[i * 3 + 1])) in mac_pton() 19 if (i != ETH_ALEN - 1 && s[i * 3 + 2] != ':') in mac_pton() 22 for (i = 0; i < ETH_ALEN; i++) { in mac_pton() 23 mac[i] = (hex_to_bin(s[i * 3]) << 4) | hex_to_bin(s[i * 3 + 1]); in mac_pton()
|
D | sg_split.c | 26 int i; in sg_calculate_split() local 32 for (i = 0; i < nb_splits; i++) { in sg_calculate_split() 33 splitters[i].in_sg0 = NULL; in sg_calculate_split() 34 splitters[i].nents = 0; in sg_calculate_split() 37 for_each_sg(in, sg, nents, i) { in sg_calculate_split() 81 int i, j; in sg_split_phys() local 85 for (i = 0, split = splitters; i < nb_splits; i++, split++) { in sg_split_phys() 107 int i, j; in sg_split_mapped() local 111 for (i = 0, split = splitters; i < nb_splits; i++, split++) { in sg_split_mapped() 156 int i, ret; in sg_split() local [all …]
|
D | test_siphash.c | 117 u8 i; in siphash_test_init() local 120 for (i = 0; i < 64; ++i) { in siphash_test_init() 121 in[i] = i; in siphash_test_init() 122 in_unaligned[i + 1] = i; in siphash_test_init() 123 if (siphash(in, i, &test_key_siphash) != in siphash_test_init() 124 test_vectors_siphash[i]) { in siphash_test_init() 125 pr_info("siphash self-test aligned %u: FAIL\n", i + 1); in siphash_test_init() 128 if (siphash(in_unaligned + 1, i, &test_key_siphash) != in siphash_test_init() 129 test_vectors_siphash[i]) { in siphash_test_init() 130 pr_info("siphash self-test unaligned %u: FAIL\n", i + 1); in siphash_test_init() [all …]
|
D | test_hash.c | 50 size_t i; in fill_buf() local 52 for (i = 0; i < len; i++) { in fill_buf() 54 buf[i] = mod255(seed); in fill_buf() 149 int i, j; in test_hash_init() local 157 for (i = 0; i <= j; i++) { in test_hash_init() 158 u64 hashlen = hashlen_string(buf+i, buf+i); in test_hash_init() 159 u32 h0 = full_name_hash(buf+i, buf+i, j-i); in test_hash_init() 162 if (hashlen_len(hashlen) != j-i) { in test_hash_init() 165 i, j, hashlen_len(hashlen), j-i); in test_hash_init() 172 i, j, hashlen_hash(hashlen), h0); in test_hash_init() [all …]
|
D | bch.c | 118 int i; in encode_bch_unaligned() local 125 for (i = 0; i < l; i++) in encode_bch_unaligned() 126 ecc[i] = ((ecc[i] << 8)|(ecc[i+1] >> 24))^(*p++); in encode_bch_unaligned() 139 unsigned int i, nwords = BCH_ECC_WORDS(bch)-1; in load_ecc8() local 141 for (i = 0; i < nwords; i++, src += 4) in load_ecc8() 142 dst[i] = (src[0] << 24)|(src[1] << 16)|(src[2] << 8)|src[3]; in load_ecc8() 155 unsigned int i, nwords = BCH_ECC_WORDS(bch)-1; in store_ecc8() local 157 for (i = 0; i < nwords; i++) { in store_ecc8() 158 *dst++ = (src[i] >> 24); in store_ecc8() 159 *dst++ = (src[i] >> 16) & 0xff; in store_ecc8() [all …]
|
D | uuid.c | 88 unsigned int i; in uuid_is_valid() local 90 for (i = 0; i < UUID_STRING_LEN; i++) { in uuid_is_valid() 91 if (i == 8 || i == 13 || i == 18 || i == 23) { in uuid_is_valid() 92 if (uuid[i] != '-') in uuid_is_valid() 94 } else if (!isxdigit(uuid[i])) { in uuid_is_valid() 106 unsigned int i; in __uuid_parse() local 111 for (i = 0; i < 16; i++) { in __uuid_parse() 112 int hi = hex_to_bin(uuid[si[i] + 0]); in __uuid_parse() 113 int lo = hex_to_bin(uuid[si[i] + 1]); in __uuid_parse() 115 b[ei[i]] = (hi << 4) | lo; in __uuid_parse()
|
D | inflate.c | 341 register unsigned i; /* counter, current code */ in huft_build() local 375 p = b; i = n; in huft_build() 377 Tracecv(*p, (stderr, (n-i >= ' ' && n-i <= '~' ? "%c %d\n" : "0x%x %d\n"), in huft_build() 378 n-i, *p)); in huft_build() 381 } while (--i); in huft_build() 400 for (i = BMAX; i; i--) in huft_build() 401 if (c[i]) in huft_build() 403 g = i; /* maximum code length */ in huft_build() 404 if ((unsigned)l > i) in huft_build() 405 l = i; in huft_build() [all …]
|
D | test_parman.c | 145 int i; in test_parman_priority_gen() local 152 for (i = 0; i < TEST_PARMAN_PRIO_COUNT; i++) { in test_parman_priority_gen() 153 struct test_parman_prio *prio = &test_parman->prios[i]; in test_parman_priority_gen() 165 int i; in test_parman_prios_init() local 167 for (i = 0; i < TEST_PARMAN_PRIO_COUNT; i++) { in test_parman_prios_init() 168 struct test_parman_prio *prio = &test_parman->prios[i]; in test_parman_prios_init() 179 int i; in test_parman_prios_fini() local 181 for (i = 0; i < TEST_PARMAN_PRIO_COUNT; i++) { in test_parman_prios_fini() 182 struct test_parman_prio *prio = &test_parman->prios[i]; in test_parman_prios_fini() 190 int i; in test_parman_items_init() local [all …]
|
D | devres.c | 243 int i; in pcim_iomap_release() local 245 for (i = 0; i < PCIM_IOMAP_MAX; i++) in pcim_iomap_release() 246 if (this->table[i]) in pcim_iomap_release() 247 pci_iounmap(dev, this->table[i]); in pcim_iomap_release() 313 int i; in pcim_iounmap() local 320 for (i = 0; i < PCIM_IOMAP_MAX; i++) in pcim_iounmap() 321 if (tbl[i] == addr) { in pcim_iounmap() 322 tbl[i] = NULL; in pcim_iounmap() 340 int i, rc; in pcim_iomap_regions() local 346 for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { in pcim_iomap_regions() [all …]
|
D | test_hexdump.c | 58 unsigned int i; in test_hexdump_prepare_test() local 80 for (i = 0; i < l / gs; i++) { in test_hexdump_prepare_test() 89 if (i) in test_hexdump_prepare_test() 192 unsigned int i = 0; in test_hexdump_overflow_set() local 196 int gs = 1 << i; in test_hexdump_overflow_set() 200 } while (i++ < 3); in test_hexdump_overflow_set() 205 unsigned int i; in test_hexdump_init() local 209 for (i = 0; i < 16; i++) in test_hexdump_init() 213 for (i = 0; i < 16; i++) in test_hexdump_init() 216 for (i = 0; i <= TEST_HEXDUMP_BUF_SIZE; i++) in test_hexdump_init() [all …]
|
/lib/raid6/ |
D | mktables.c | 58 int i, j, k; in main() local 69 for (i = 0; i < 256; i++) { in main() 74 printf("0x%02x,%c", gfmul(i, j + k), in main() 88 for (i = 0; i < 256; i++) { in main() 93 printf("0x%02x,%c", gfmul(i, j + k), in main() 99 printf("0x%02x,%c", gfmul(i, (j + k) << 4), in main() 113 for (i = 0; i < 256; i += 8) { in main() 116 exptbl[i + j] = v; in main() 131 for (i = 0; i < 256; i += 8) { in main() 136 if (exptbl[k] == (i + j)) { in main() [all …]
|
/lib/xz/ |
D | xz_dec_bcj.c | 95 size_t i; in bcj_x86() local 107 for (i = 0; i < size; ++i) { in bcj_x86() 108 if ((buf[i] & 0xFE) != 0xE8) in bcj_x86() 111 prev_pos = i - prev_pos; in bcj_x86() 117 b = buf[i + 4 - mask_to_bit_num[prev_mask]]; in bcj_x86() 120 prev_pos = i; in bcj_x86() 127 prev_pos = i; in bcj_x86() 129 if (bcj_x86_test_msbyte(buf[i + 4])) { in bcj_x86() 130 src = get_unaligned_le32(buf + i + 1); in bcj_x86() 132 dest = src - (s->pos + (uint32_t)i + 5); in bcj_x86() [all …]
|
/lib/raid6/test/ |
D | test.c | 34 int i, j; in makedata() local 36 for (i = start; i <= stop; i++) { in makedata() 38 data[i][j] = rand(); in makedata() 40 dataptrs[i] = data[i]; in makedata() 56 static int test_disks(int i, int j) in test_disks() argument 63 dataptrs[i] = recovi; in test_disks() 66 raid6_dual_recov(NDISKS, PAGE_SIZE, i, j, (void **)&dataptrs); in test_disks() 68 erra = memcmp(data[i], recovi, PAGE_SIZE); in test_disks() 71 if (i < NDISKS-2 && j == NDISKS-1) { in test_disks() 78 i, disk_type(i), in test_disks() [all …]
|
/lib/mpi/ |
D | mpih-div.c | 75 mpi_size_t i; in mpihelp_divrem() local 88 for (i = nsize - 2; i >= 0; i--) in mpihelp_divrem() 89 udiv_qrnnd(qp[i], n1, n1, np[i], d); in mpihelp_divrem() 92 for (i = qextra_limbs - 1; i >= 0; i--) in mpihelp_divrem() 93 udiv_qrnnd(qp[i], n1, n1, 0, d); in mpihelp_divrem() 101 mpi_size_t i; in mpihelp_divrem() local 116 for (i = qextra_limbs + nsize - 2 - 1; i >= 0; i--) { in mpihelp_divrem() 120 if (i >= qextra_limbs) in mpihelp_divrem() 135 qp[i] = q; in mpihelp_divrem() 156 qp[i] = q; in mpihelp_divrem() [all …]
|