Home
last modified time | relevance | path

Searched refs:k (Results 1 – 25 of 28) sorted by relevance

12

/lib/
Dbitmap.c51 unsigned int k, lim = bits/BITS_PER_LONG; in __bitmap_equal() local
52 for (k = 0; k < lim; ++k) in __bitmap_equal()
53 if (bitmap1[k] != bitmap2[k]) in __bitmap_equal()
57 if ((bitmap1[k] ^ bitmap2[k]) & BITMAP_LAST_WORD_MASK(bits)) in __bitmap_equal()
69 unsigned int k, lim = bits / BITS_PER_LONG; in __bitmap_or_equal() local
72 for (k = 0; k < lim; ++k) { in __bitmap_or_equal()
73 if ((bitmap1[k] | bitmap2[k]) != bitmap3[k]) in __bitmap_or_equal()
80 tmp = (bitmap1[k] | bitmap2[k]) ^ bitmap3[k]; in __bitmap_or_equal()
86 unsigned int k, lim = BITS_TO_LONGS(bits); in __bitmap_complement() local
87 for (k = 0; k < lim; ++k) in __bitmap_complement()
[all …]
Dklist.c84 void klist_init(struct klist *k, void (*get)(struct klist_node *), in klist_init() argument
87 INIT_LIST_HEAD(&k->k_list); in klist_init()
88 spin_lock_init(&k->k_lock); in klist_init()
89 k->get = get; in klist_init()
90 k->put = put; in klist_init()
94 static void add_head(struct klist *k, struct klist_node *n) in add_head() argument
96 spin_lock(&k->k_lock); in add_head()
97 list_add(&n->n_node, &k->k_list); in add_head()
98 spin_unlock(&k->k_lock); in add_head()
101 static void add_tail(struct klist *k, struct klist_node *n) in add_tail() argument
[all …]
Dtest_string.c9 unsigned i, j, k; in memset16_selftest() local
20 for (k = 0; k < 512; k++) { in memset16_selftest()
21 v = p[k]; in memset16_selftest()
22 if (k < i) { in memset16_selftest()
25 } else if (k < i + j) { in memset16_selftest()
39 return (i << 24) | (j << 16) | k | 0x8000; in memset16_selftest()
45 unsigned i, j, k; in memset32_selftest() local
56 for (k = 0; k < 512; k++) { in memset32_selftest()
57 v = p[k]; in memset32_selftest()
58 if (k < i) { in memset32_selftest()
[all …]
Dtest_hash.c71 int k; in test_int_hash() local
88 for (k = 1; k <= 32; k++) { in test_int_hash()
89 u32 const m = ((u32)2 << (k-1)) - 1; /* Low k bits set */ in test_int_hash()
92 hash_or[0][k] |= h1 = hash_32(h0, k); in test_int_hash()
94 pr_err("hash_32(%#x, %d) = %#x > %#x", h0, k, h1, m); in test_int_hash()
98 h2 = hash_32_generic(h0, k); in test_int_hash()
102 " = %#x", h0, k, h1, h2); in test_int_hash()
108 h0, k, h1, m); in test_int_hash()
114 hash_or[1][k] |= h1 = hash_64(h64, k); in test_int_hash()
116 pr_err("hash_64(%#llx, %d) = %#x > %#x", h64, k, h1, m); in test_int_hash()
[all …]
Dts_kmp.c77 unsigned int k, q; in compute_prefix_tbl() local
80 for (k = 0, q = 1; q < len; q++) { in compute_prefix_tbl()
81 while (k > 0 && (icase ? toupper(pattern[k]) : pattern[k]) in compute_prefix_tbl()
83 k = prefix_tbl[k-1]; in compute_prefix_tbl()
84 if ((icase ? toupper(pattern[k]) : pattern[k]) in compute_prefix_tbl()
86 k++; in compute_prefix_tbl()
87 prefix_tbl[q] = k; in compute_prefix_tbl()
Dbootconfig.c569 struct xbc_node *find_match_node(struct xbc_node *node, char *k) in find_match_node() argument
572 if (!strcmp(xbc_node_get_data(node), k)) in find_match_node()
579 static int __init __xbc_add_key(char *k) in __xbc_add_key() argument
583 if (!xbc_valid_keyword(k)) in __xbc_add_key()
584 return xbc_parse_error("Invalid keyword", k); in __xbc_add_key()
590 node = find_match_node(xbc_nodes, k); in __xbc_add_key()
596 node = find_match_node(child, k); in __xbc_add_key()
603 node = xbc_add_child(k, XBC_KEY); in __xbc_add_key()
610 static int __init __xbc_parse_keys(char *k) in __xbc_parse_keys() argument
615 k = strim(k); in __xbc_parse_keys()
[all …]
Dinflate.c234 #define NEEDBITS(n) {while(k<(n)){b|=((ulg)NEXTBYTE())<<k;k+=8;}}
235 #define DUMPBITS(n) {b>>=(n);k-=(n);}
343 register int k; /* number of bits in current code */ in huft_build() local
397 k = j; /* minimum code length */ in huft_build()
454 for (; k <= g; k++) in huft_build()
457 a = c[k]; in huft_build()
463 while (k > w + l) in huft_build()
471 if ((f = 1 << (j = k - w)) > a + 1) /* try a k-w bit table */ in huft_build()
475 xp = c + k; in huft_build()
518 r.b = (uch)(k - w); in huft_build()
[all …]
Doid_registry.c31 unsigned i, j, k, hash; in look_up_OID() local
47 k = OID__NR; in look_up_OID()
48 while (i < k) { in look_up_OID()
49 j = (i + k) / 2; in look_up_OID()
53 k = j; in look_up_OID()
64 k = j; in look_up_OID()
79 k = j; in look_up_OID()
Dbch.c452 int k, pp = -1; in compute_error_locator_polynomial() local
465 k = 2*i-pp; in compute_error_locator_polynomial()
472 elp->c[j+k] ^= a_pow(bch, tmp+l); in compute_error_locator_polynomial()
476 tmp = pelp->deg+k; in compute_error_locator_polynomial()
504 int rem, c, r, p, k, param[BCH_MAX_M]; in solve_linear_system() local
506 k = 0; in solve_linear_system()
512 p = c-k; in solve_linear_system()
534 param[k++] = c; in solve_linear_system()
539 if (k > 0) { in solve_linear_system()
540 p = k; in solve_linear_system()
[all …]
Dkobject.c836 void kset_init(struct kset *k) in kset_init() argument
838 kobject_init_internal(&k->kobj); in kset_init()
839 INIT_LIST_HEAD(&k->list); in kset_init()
840 spin_lock_init(&k->list_lock); in kset_init()
878 int kset_register(struct kset *k) in kset_register() argument
882 if (!k) in kset_register()
885 if (!k->kobj.ktype) { in kset_register()
890 kset_init(k); in kset_register()
891 err = kobject_add_internal(&k->kobj); in kset_register()
894 kobject_uevent(&k->kobj, KOBJ_ADD); in kset_register()
[all …]
Ddecompress_bunzip2.c162 i, j, k, t, runPos, symCount, symTotal, nSelectors, *byteCount; in get_next_block() local
199 k = get_bits(bd, 16); in get_next_block()
201 if (k&(1 << (15-j))) in get_next_block()
258 k = get_bits(bd, 2); in get_next_block()
259 if (k < 2) { in get_next_block()
265 t += (((k+1)&2)-1); in get_next_block()
489 k = j+byteCount[i]; in get_next_block()
491 j = k; in get_next_block()
Dtest_ubsan.c38 volatile int i = 4, j = 5, k = -1; in test_ubsan_out_of_bounds() local
49 arr[k] = i; in test_ubsan_out_of_bounds()
Diov_iter.c1285 unsigned k; in iov_iter_alignment_iovec() local
1287 for (k = 0; k < i->nr_segs; k++, skip = 0) { in iov_iter_alignment_iovec()
1288 size_t len = i->iov[k].iov_len - skip; in iov_iter_alignment_iovec()
1290 res |= (unsigned long)i->iov[k].iov_base + skip; in iov_iter_alignment_iovec()
1307 unsigned k; in iov_iter_alignment_bvec() local
1309 for (k = 0; k < i->nr_segs; k++, skip = 0) { in iov_iter_alignment_bvec()
1310 size_t len = i->bvec[k].bv_len - skip; in iov_iter_alignment_bvec()
1311 res |= (unsigned long)i->bvec[k].bv_offset + skip; in iov_iter_alignment_bvec()
1352 unsigned k; in iov_iter_gap_alignment() local
1357 for (k = 0; k < i->nr_segs; k++) { in iov_iter_gap_alignment()
[all …]
Dtest_xarray.c600 unsigned long i, j, k; in check_multi_store() local
650 for (k = 0; k < max_order; k++) { in check_multi_store()
651 void *entry = xa_load(xa, (1UL << k) - 1); in check_multi_store()
652 if ((i < k) && (j < k)) in check_multi_store()
1006 unsigned long i, j, k; in check_find_1() local
1021 for (k = 0; k < 100; k++) { in check_find_1()
1022 unsigned long index = k; in check_find_1()
1025 if (k <= j) in check_find_1()
1027 else if (k <= i) in check_find_1()
1032 index = k; in check_find_1()
[all …]
Dtest_rhashtable.c273 unsigned int i, j, k; in test_rhltable() local
294 k = prandom_u32(); in test_rhltable()
297 rhl_test_objects[i].value.id = k; in test_rhltable()
314 .id = k, in test_rhltable()
/lib/raid6/
Dmktables.c55 int i, j, k; in main() local
70 for (k = 0; k < 8; k++) in main()
71 printf("0x%02x,%c", gfmul(i, j + k), in main()
72 (k == 7) ? '\n' : ' '); in main()
89 for (k = 0; k < 8; k++) in main()
90 printf("0x%02x,%c", gfmul(i, j + k), in main()
91 (k == 7) ? '\n' : ' '); in main()
95 for (k = 0; k < 8; k++) in main()
96 printf("0x%02x,%c", gfmul(i, (j + k) << 4), in main()
97 (k == 7) ? '\n' : ' '); in main()
[all …]
/lib/mpi/
Dmpi-mod.c16 int k; member
52 ctx->k = mpi_get_nlimbs(m); in mpi_barrett_init()
53 tmp = mpi_alloc(ctx->k + 1); in mpi_barrett_init()
57 mpi_lshift_limbs(tmp, 2 * ctx->k); in mpi_barrett_init()
61 ctx->r1 = mpi_alloc(2 * ctx->k + 1); in mpi_barrett_init()
62 ctx->r2 = mpi_alloc(2 * ctx->k + 1); in mpi_barrett_init()
98 int k = ctx->k; in mpi_mod_barrett() local
105 if (mpi_get_nlimbs(x) > 2*k) { in mpi_mod_barrett()
119 mpi_rshift_limbs(r2, k-1); in mpi_mod_barrett()
121 mpi_rshift_limbs(r2, k+1); in mpi_mod_barrett()
[all …]
Dmpi-inv.c34 unsigned int k; in mpi_invm() local
46 for (k = 0; !mpi_test_bit(u, 0) && !mpi_test_bit(v, 0); k++) { in mpi_invm()
Dec.c1217 MPI x1, y1, z1, k, h, yy; in mpi_ec_mul_point() local
1325 k = mpi_copy(scalar); in mpi_ec_mul_point()
1328 if (mpi_has_sign(k)) { in mpi_ec_mul_point()
1329 k->sign = 0; in mpi_ec_mul_point()
1352 mpi_mul(h, k, mpi_const(MPI_C_THREE)); /* h = 3k */ in mpi_ec_mul_point()
1382 if (mpi_test_bit(h, i) == 1 && mpi_test_bit(k, i) == 0) { in mpi_ec_mul_point()
1386 if (mpi_test_bit(h, i) == 0 && mpi_test_bit(k, i) == 1) { in mpi_ec_mul_point()
1396 mpi_free(k); in mpi_ec_mul_point()
/lib/crypto/
Dchacha20poly1305.c24 static void chacha_load_key(u32 *k, const u8 *in) in chacha_load_key() argument
26 k[0] = get_unaligned_le32(in); in chacha_load_key()
27 k[1] = get_unaligned_le32(in + 4); in chacha_load_key()
28 k[2] = get_unaligned_le32(in + 8); in chacha_load_key()
29 k[3] = get_unaligned_le32(in + 12); in chacha_load_key()
30 k[4] = get_unaligned_le32(in + 16); in chacha_load_key()
31 k[5] = get_unaligned_le32(in + 20); in chacha_load_key()
32 k[6] = get_unaligned_le32(in + 24); in chacha_load_key()
33 k[7] = get_unaligned_le32(in + 28); in chacha_load_key()
38 u32 k[CHACHA_KEY_WORDS]; in xchacha_init() local
[all …]
Ddes.c623 static unsigned long des_ekey(u32 *pe, const u8 *k) in des_ekey() argument
629 d = k[4]; d &= 0x0e; d <<= 4; d |= k[0] & 0x1e; d = pc1[d]; in des_ekey()
630 c = k[5]; c &= 0x0e; c <<= 4; c |= k[1] & 0x1e; c = pc1[c]; in des_ekey()
631 b = k[6]; b &= 0x0e; b <<= 4; b |= k[2] & 0x1e; b = pc1[b]; in des_ekey()
632 a = k[7]; a &= 0x0e; a <<= 4; a |= k[3] & 0x1e; a = pc1[a]; in des_ekey()
657 d = k[0]; d &= 0xe0; d >>= 4; d |= k[4] & 0xf0; d = pc1[d + 1]; in des_ekey()
658 c = k[1]; c &= 0xe0; c >>= 4; c |= k[5] & 0xf0; c = pc1[c + 1]; in des_ekey()
659 b = k[2]; b &= 0xe0; b >>= 4; b |= k[6] & 0xf0; b = pc1[b + 1]; in des_ekey()
660 a = k[3]; a &= 0xe0; a >>= 4; a |= k[7] & 0xf0; a = pc1[a + 1]; in des_ekey()
714 static void dkey(u32 *pe, const u8 *k) in dkey() argument
[all …]
Darc4.c15 int i, j = 0, k = 0; in arc4_setkey() local
26 j = (j + in_key[k] + a) & 0xff; in arc4_setkey()
29 if (++k >= key_len) in arc4_setkey()
30 k = 0; in arc4_setkey()
Dchacha20poly1305-selftest.c8888 size_t i, j, k, total_len; in chacha20poly1305_selftest() local
9031 k = 0; in chacha20poly1305_selftest()
9034 sg_set_buf(&sg_src[k++], input, i); in chacha20poly1305_selftest()
9036 sg_set_buf(&sg_src[k++], input + i, j - i); in chacha20poly1305_selftest()
9038 sg_set_buf(&sg_src[k++], input + j, total_len - j); in chacha20poly1305_selftest()
9039 sg_init_marker(sg_src, k); in chacha20poly1305_selftest()
9056 for (k = 0; k < total_len - POLY1305_DIGEST_SIZE; ++k) { in chacha20poly1305_selftest()
9057 if (computed_output[k]) in chacha20poly1305_selftest()
9063 for (k = 0; k < total_len - POLY1305_DIGEST_SIZE; ++k) { in chacha20poly1305_selftest()
9064 if (input[k]) in chacha20poly1305_selftest()
/lib/reed_solomon/
Ddecode_rs.c15 int i, j, r, k, pad; variable
200 for (i = 1, k = iprim - 1; i <= nn; i++, k = rs_modnn(rs, k + iprim)) {
211 if (k < pad) {
218 loc[count] = k;
295 k = (fcr + i) * prim * (nn-loc[j]-1);
296 tmp ^= alpha_to[rs_modnn(rs, index_of[b[j]] + k)];
/lib/zlib_deflate/
Ddeftree.c133 static void pqdownheap (deflate_state *s, ct_data *tree, int k);
320 int k /* node to move down */ in pqdownheap() argument
323 int v = s->heap[k]; in pqdownheap()
324 int j = k << 1; /* left son of k */ in pqdownheap()
335 s->heap[k] = s->heap[j]; k = j; in pqdownheap()
340 s->heap[k] = v; in pqdownheap()

12