/lib/reed_solomon/ |
D | decode_rs.c | 15 int i, j, r, k, pad; variable 47 for (i = 0; i < nroots; i++) { 51 if (s[i] != nn) 61 for (i = 0; i < nroots; i++) 62 syn[i] = (((uint16_t) data[0]) ^ invmsk) & msk; 65 for (i = 0; i < nroots; i++) { 66 if (syn[i] == 0) { 67 syn[i] = (((uint16_t) data[j]) ^ 70 syn[i] = ((((uint16_t) data[j]) ^ 72 alpha_to[rs_modnn(rs, index_of[syn[i]] + [all …]
|
/lib/ |
D | test_vmalloc.c | 79 int i; in random_size_align_alloc_test() local 81 for (i = 0; i < test_loop_count; i++) { in random_size_align_alloc_test() 116 int i; in align_shift_alloc_test() local 118 for (i = 0; i < BITS_PER_LONG; i++) { in align_shift_alloc_test() 119 align = ((unsigned long) 1) << i; in align_shift_alloc_test() 139 int i; in fix_align_alloc_test() local 141 for (i = 0; i < test_loop_count; i++) { in fix_align_alloc_test() 162 int i; in random_size_alloc_test() local 164 for (i = 0; i < test_loop_count; i++) { in random_size_alloc_test() 165 get_random_bytes(&n, sizeof(i)); in random_size_alloc_test() [all …]
|
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 | test_ida.c | 33 int i, id; in ida_check_alloc() local 35 for (i = 0; i < 10000; i++) in ida_check_alloc() 36 IDA_BUG_ON(ida, ida_alloc(ida, GFP_KERNEL) != i); in ida_check_alloc() 40 for (i = 0; i < 3; i++) { in ida_check_alloc() 43 if (i == 2) in ida_check_alloc() 47 for (i = 0; i < 5000; i++) in ida_check_alloc() 48 ida_free(ida, i); in ida_check_alloc() 86 unsigned long i; in ida_check_leaf() local 88 for (i = 0; i < IDA_BITMAP_BITS; i++) { in ida_check_leaf() 90 base + i); in ida_check_leaf() [all …]
|
D | test_memcat_p.c | 25 int err = -ENOMEM, i, r, total = 0; in test_memcat_p_init() local 35 for (i = 0, r = 1; i < INPUT_MAX - 1; i++) { in test_memcat_p_init() 36 in0[i] = kmalloc(sizeof(**in0), GFP_KERNEL); in test_memcat_p_init() 37 if (!in0[i]) in test_memcat_p_init() 40 in1[i] = kmalloc(sizeof(**in1), GFP_KERNEL); in test_memcat_p_init() 41 if (!in1[i]) { in test_memcat_p_init() 42 kfree(in0[i]); in test_memcat_p_init() 48 in0[i]->num = r; in test_memcat_p_init() 49 in1[i]->num = -r; in test_memcat_p_init() 50 in0[i]->magic = MAGIC; in test_memcat_p_init() [all …]
|
D | build_OID_registry | 49 for (my $i = 0; $i <= $#names; $i++) { 50 my $name = $names[$i]; 51 my $oid = $oids[$i]; 79 for (my $i = 0; $i <= $#names; $i++) { 80 print C_FILE "\t[OID_", $names[$i], "] = ", $indices[$i], ",\n" 90 for (my $i = 0; $i <= $#names; $i++) { 93 my @components = split(/[.]/, $oids[$i]); 117 for (my $i = 0; $i <= $#names; $i++) { 118 my @octets = @{$encoded_oids[$i]}; 135 for (my $i = 0; $i <= $#names; $i++) { [all …]
|
D | test_string.c | 9 unsigned i, j, k; in memset16_selftest() local 16 for (i = 0; i < 256; i++) { in memset16_selftest() 19 memset16(p + i, 0xb1b2, j); in memset16_selftest() 22 if (k < i) { in memset16_selftest() 25 } else if (k < i + j) { in memset16_selftest() 38 if (i < 256) in memset16_selftest() 39 return (i << 24) | (j << 16) | k | 0x8000; in memset16_selftest() 45 unsigned i, j, k; in memset32_selftest() local 52 for (i = 0; i < 256; i++) { in memset32_selftest() 55 memset32(p + i, 0xb1b2b3b4, j); in memset32_selftest() [all …]
|
D | decompress_bunzip2.c | 162 i, j, k, t, runPos, symCount, symTotal, nSelectors, *byteCount; in get_next_block() local 175 i = get_bits(bd, 24); in get_next_block() 178 if ((i == 0x177245) && (j == 0x385090)) in get_next_block() 180 if ((i != 0x314159) || (j != 0x265359)) in get_next_block() 197 for (i = 0; i < 16; i++) { in get_next_block() 198 if (t&(1 << (15-i))) { in get_next_block() 202 symToByte[symTotal++] = (16*i)+j; in get_next_block() 217 for (i = 0; i < groupCount; i++) in get_next_block() 218 mtfSymbol[i] = i; in get_next_block() 219 for (i = 0; i < nSelectors; i++) { in get_next_block() [all …]
|
D | test_rhashtable.c | 140 unsigned int i; in test_rht_lookup() local 142 for (i = 0; i < entries; i++) { in test_rht_lookup() 144 bool expected = !(i % 2); in test_rht_lookup() 146 .id = i, in test_rht_lookup() 149 if (array[i / 2].value.id == TEST_INSERT_FAIL) in test_rht_lookup() 162 if (obj->value.id != i) { in test_rht_lookup() 164 obj->value.id, i); in test_rht_lookup() 213 unsigned int i, insert_retries = 0; in test_rhashtable() local 222 for (i = 0; i < entries; i++) { in test_rhashtable() 223 struct test_obj *obj = &array[i]; in test_rhashtable() [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 | 61 unsigned int i, text_len, consumed = state->offset; in bm_find() local 75 for (i = 0; i < bm->patlen; i++) in bm_find() 76 if ((icase ? toupper(text[shift-i]) in bm_find() 77 : text[shift-i]) in bm_find() 78 != bm->pattern[bm->patlen-1-i]) in bm_find() 85 next: bs = bm->bad_shift[text[shift-i]]; in bm_find() 88 shift = max_t(int, shift-i+bs, shift+bm->good_shift[i]); in bm_find() 96 static int subpattern(u8 *pattern, int i, int j, int g) in subpattern() argument 98 int x = i+g-1, y = j+g-1, ret = 0; in subpattern() 106 ret = pattern[i-1] != pattern[j-1]; in subpattern() [all …]
|
D | iov_iter.c | 14 #define iterate_iovec(i, n, __v, __p, skip, STEP) { \ argument 17 __p = i->iov; \ 42 #define iterate_kvec(i, n, __v, __p, skip, STEP) { \ argument 44 __p = i->kvec; \ 65 #define iterate_bvec(i, n, __v, __bi, skip, STEP) { \ argument 70 for_each_bvec(__v, i->bvec, __bi, __start) { \ 77 #define iterate_all_kinds(i, n, v, I, B, K) { \ argument 79 size_t skip = i->iov_offset; \ 80 if (unlikely(i->type & ITER_BVEC)) { \ 83 iterate_bvec(i, n, v, __bi, skip, (B)) \ [all …]
|
D | gen_crc32table.c | 40 unsigned i, j; in crc32init_le_generic() local 45 for (i = LE_TABLE_SIZE >> 1; i; i >>= 1) { in crc32init_le_generic() 47 for (j = 0; j < LE_TABLE_SIZE; j += 2 * i) in crc32init_le_generic() 48 tab[0][i + j] = crc ^ tab[0][j]; in crc32init_le_generic() 50 for (i = 0; i < LE_TABLE_SIZE; i++) { in crc32init_le_generic() 51 crc = tab[0][i]; in crc32init_le_generic() 54 tab[j][i] = crc; in crc32init_le_generic() 74 unsigned i, j; in crc32init_be() local 79 for (i = 1; i < BE_TABLE_SIZE; i <<= 1) { in crc32init_be() 81 for (j = 0; j < i; j++) in crc32init_be() [all …]
|
D | cmdline.c | 89 int res, i = 1; in get_options() local 91 while (i < nints) { in get_options() 92 res = get_option((char **)&str, ints + i); in get_options() 97 range_nums = get_range((char **)&str, ints + i, nints - i); in get_options() 105 i += (range_nums - 1); in get_options() 107 i++; in get_options() 111 ints[0] = i - 1; in get_options() 203 unsigned int i, equals = 0; in next_arg() local 213 for (i = 0; args[i]; i++) { in next_arg() 214 if (isspace(args[i]) && !in_quote) in next_arg() [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 | 24 int i; in sg_calculate_split() local 30 for (i = 0; i < nb_splits; i++) { in sg_calculate_split() 31 splitters[i].in_sg0 = NULL; in sg_calculate_split() 32 splitters[i].nents = 0; in sg_calculate_split() 35 for_each_sg(in, sg, nents, i) { in sg_calculate_split() 79 int i, j; in sg_split_phys() local 83 for (i = 0, split = splitters; i < nb_splits; i++, split++) { in sg_split_phys() 105 int i, j; in sg_split_mapped() local 109 for (i = 0, split = splitters; i < nb_splits; i++, split++) { in sg_split_mapped() 154 int i, ret; in sg_split() local [all …]
|
D | test_xarray.c | 146 unsigned long i, j; in check_xa_load() local 148 for (i = 0; i < 1024; i++) { in check_xa_load() 151 if (j < i) in check_xa_load() 156 XA_BUG_ON(xa, xa_store_index(xa, i, GFP_KERNEL) != NULL); in check_xa_load() 159 for (i = 0; i < 1024; i++) { in check_xa_load() 162 if (j >= i) in check_xa_load() 167 xa_erase_index(xa, i); in check_xa_load() 207 unsigned long i; in check_xa_mark_1() local 216 for (i = base; i < next; i++) { in check_xa_mark_1() 217 XA_STATE(xas, xa, i); in check_xa_mark_1() [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 | 51 size_t i; in fill_buf() local 53 for (i = 0; i < len; i++) { in fill_buf() 55 buf[i] = mod255(seed); in fill_buf() 150 int i, j; in test_hash_init() local 158 for (i = 0; i <= j; i++) { in test_hash_init() 159 u64 hashlen = hashlen_string(buf+i, buf+i); in test_hash_init() 160 u32 h0 = full_name_hash(buf+i, buf+i, j-i); in test_hash_init() 163 if (hashlen_len(hashlen) != j-i) { in test_hash_init() 166 i, j, hashlen_len(hashlen), j-i); in test_hash_init() 173 i, j, hashlen_hash(hashlen), h0); in test_hash_init() [all …]
|
D | sbitmap.c | 48 unsigned int i; in sbitmap_init_node() local 80 for (i = 0; i < sb->map_nr; i++) { in sbitmap_init_node() 81 sb->map[i].depth = min(depth, bits_per_word); in sbitmap_init_node() 82 depth -= sb->map[i].depth; in sbitmap_init_node() 83 spin_lock_init(&sb->map[i].swap_lock); in sbitmap_init_node() 92 unsigned int i; in sbitmap_resize() local 94 for (i = 0; i < sb->map_nr; i++) in sbitmap_resize() 95 sbitmap_deferred_clear(sb, i); in sbitmap_resize() 100 for (i = 0; i < sb->map_nr; i++) { in sbitmap_resize() 101 sb->map[i].depth = min(depth, bits_per_word); in sbitmap_resize() [all …]
|
D | bch.c | 124 int i; in encode_bch_unaligned() local 131 for (i = 0; i < l; i++) in encode_bch_unaligned() 132 ecc[i] = ((ecc[i] << 8)|(ecc[i+1] >> 24))^(*p++); in encode_bch_unaligned() 145 unsigned int i, nwords = BCH_ECC_WORDS(bch)-1; in load_ecc8() local 147 for (i = 0; i < nwords; i++, src += 4) in load_ecc8() 148 dst[i] = (src[0] << 24)|(src[1] << 16)|(src[2] << 8)|src[3]; in load_ecc8() 161 unsigned int i, nwords = BCH_ECC_WORDS(bch)-1; in store_ecc8() local 163 for (i = 0; i < nwords; i++) { in store_ecc8() 164 *dst++ = (src[i] >> 24); in store_ecc8() 165 *dst++ = (src[i] >> 16) & 0xff; in store_ecc8() [all …]
|
D | uuid.c | 80 unsigned int i; in uuid_is_valid() local 82 for (i = 0; i < UUID_STRING_LEN; i++) { in uuid_is_valid() 83 if (i == 8 || i == 13 || i == 18 || i == 23) { in uuid_is_valid() 84 if (uuid[i] != '-') in uuid_is_valid() 86 } else if (!isxdigit(uuid[i])) { in uuid_is_valid() 98 unsigned int i; in __uuid_parse() local 103 for (i = 0; i < 16; i++) { in __uuid_parse() 104 int hi = hex_to_bin(uuid[si[i] + 0]); in __uuid_parse() 105 int lo = hex_to_bin(uuid[si[i] + 1]); in __uuid_parse() 107 b[ei[i]] = (hi << 4) | lo; in __uuid_parse()
|
/lib/raid6/ |
D | mktables.c | 55 int i, j, k; in main() local 66 for (i = 0; i < 256; i++) { in main() 71 printf("0x%02x,%c", gfmul(i, j + k), in main() 85 for (i = 0; i < 256; i++) { in main() 90 printf("0x%02x,%c", gfmul(i, j + k), in main() 96 printf("0x%02x,%c", gfmul(i, (j + k) << 4), in main() 110 for (i = 0; i < 256; i += 8) { in main() 113 exptbl[i + j] = v; in main() 128 for (i = 0; i < 256; i += 8) { in main() 133 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 | 31 int i, j; in makedata() local 33 for (i = start; i <= stop; i++) { in makedata() 35 data[i][j] = rand(); in makedata() 37 dataptrs[i] = data[i]; in makedata() 53 static int test_disks(int i, int j) in test_disks() argument 60 dataptrs[i] = recovi; in test_disks() 63 raid6_dual_recov(NDISKS, PAGE_SIZE, i, j, (void **)&dataptrs); in test_disks() 65 erra = memcmp(data[i], recovi, PAGE_SIZE); in test_disks() 68 if (i < NDISKS-2 && j == NDISKS-1) { in test_disks() 75 i, disk_type(i), in test_disks() [all …]
|