/lib/ |
D | linear_ranges.c | 27 unsigned int linear_range_values_in_range(const struct linear_range *r) in linear_range_values_in_range() argument 29 if (!r) in linear_range_values_in_range() 31 return r->max_sel - r->min_sel + 1; in linear_range_values_in_range() 46 unsigned int linear_range_values_in_range_array(const struct linear_range *r, in linear_range_values_in_range_array() argument 54 values = linear_range_values_in_range(&r[i]); in linear_range_values_in_range_array() 70 unsigned int linear_range_get_max_value(const struct linear_range *r) in linear_range_get_max_value() argument 72 return r->min + (r->max_sel - r->min_sel) * r->step; in linear_range_get_max_value() 87 int linear_range_get_value(const struct linear_range *r, unsigned int selector, in linear_range_get_value() argument 90 if (r->min_sel > selector || r->max_sel < selector) in linear_range_get_value() 93 *val = r->min + (selector - r->min_sel) * r->step; in linear_range_get_value() [all …]
|
D | refcount.c | 13 void refcount_warn_saturate(refcount_t *r, enum refcount_saturation_type t) in refcount_warn_saturate() argument 15 refcount_set(r, REFCOUNT_SATURATED); in refcount_warn_saturate() 55 bool refcount_dec_if_one(refcount_t *r) in refcount_dec_if_one() argument 59 return atomic_try_cmpxchg_release(&r->refs, &val, 0); in refcount_dec_if_one() 74 bool refcount_dec_not_one(refcount_t *r) in refcount_dec_not_one() argument 76 unsigned int new, val = atomic_read(&r->refs); in refcount_dec_not_one() 91 } while (!atomic_try_cmpxchg_release(&r->refs, &val, new)); in refcount_dec_not_one() 113 bool refcount_dec_and_mutex_lock(refcount_t *r, struct mutex *lock) in refcount_dec_and_mutex_lock() argument 115 if (refcount_dec_not_one(r)) in refcount_dec_and_mutex_lock() 119 if (!refcount_dec_and_test(r)) { in refcount_dec_and_mutex_lock() [all …]
|
D | atomic64_test.c | 23 r = v0; \ 25 r c_op val; \ 26 WARN(atomic##bit##_read(&v) != r, "%Lx != %Lx\n", \ 28 (unsigned long long)r); \ 47 r = v0; \ 48 r c_op val; \ 49 BUG_ON(atomic##bit##_##op(val, &v) != r); \ 50 BUG_ON(atomic##bit##_read(&v) != r); \ 56 r = v0; \ 57 r c_op val; \ [all …]
|
D | cmdline_kunit.c | 111 int r[16]; in cmdline_do_one_range_test() local 114 memset(r, 0, sizeof(r)); in cmdline_do_one_range_test() 115 get_options(in, ARRAY_SIZE(r), r); in cmdline_do_one_range_test() 116 KUNIT_EXPECT_EQ_MSG(test, r[0], e[0], "in test %u (parsed) expected %d numbers, got %d", in cmdline_do_one_range_test() 117 n, e[0], r[0]); in cmdline_do_one_range_test() 118 for (i = 1; i < ARRAY_SIZE(r); i++) in cmdline_do_one_range_test() 119 KUNIT_EXPECT_EQ_MSG(test, r[i], e[i], "in test %u at %u", n, i); in cmdline_do_one_range_test() 121 memset(r, 0, sizeof(r)); in cmdline_do_one_range_test() 122 get_options(in, 0, r); in cmdline_do_one_range_test() 123 KUNIT_EXPECT_EQ_MSG(test, r[0], e[0], "in test %u (validated) expected %d numbers, got %d", in cmdline_do_one_range_test() [all …]
|
D | generic-radix-tree.c | 40 static inline unsigned genradix_root_to_depth(struct genradix_root *r) in genradix_root_to_depth() argument 42 return (unsigned long) r & GENRADIX_DEPTH_MASK; in genradix_root_to_depth() 45 static inline struct genradix_node *genradix_root_to_node(struct genradix_root *r) in genradix_root_to_node() argument 47 return (void *) ((unsigned long) r & ~GENRADIX_DEPTH_MASK); in genradix_root_to_node() 56 struct genradix_root *r = READ_ONCE(radix->root); in __genradix_ptr() local 57 struct genradix_node *n = genradix_root_to_node(r); in __genradix_ptr() 58 unsigned level = genradix_root_to_depth(r); in __genradix_ptr() 113 struct genradix_root *r = v, *new_root; in __genradix_ptr_alloc() local 115 n = genradix_root_to_node(r); in __genradix_ptr_alloc() 116 level = genradix_root_to_depth(r); in __genradix_ptr_alloc() [all …]
|
D | bch.c | 247 uint32_t w, r[BCH_ECC_MAX_WORDS]; in bch_encode() local 248 const size_t r_bytes = BCH_ECC_WORDS(bch) * sizeof(*r); in bch_encode() 255 if (WARN_ON(r_bytes > sizeof(r))) in bch_encode() 279 memcpy(r, bch->ecc_buf, r_bytes); in bch_encode() 300 w ^= r[0]; in bch_encode() 307 r[i] = r[i+1]^p0[i]^p1[i]^p2[i]^p3[i]; in bch_encode() 309 r[l] = p0[l]^p1[l]^p2[l]^p3[l]; in bch_encode() 311 memcpy(bch->ecc_buf, r, r_bytes); in bch_encode() 504 int rem, c, r, p, k, param[BCH_MAX_M]; in solve_linear_system() local 514 for (r = p; r < m; r++) { in solve_linear_system() [all …]
|
D | bitmap.c | 626 static void bitmap_set_region(const struct region *r, unsigned long *bitmap) in bitmap_set_region() argument 630 for (start = r->start; start <= r->end; start += r->group_len) in bitmap_set_region() 631 bitmap_set(bitmap, start, min(r->end - start + 1, r->off)); in bitmap_set_region() 634 static int bitmap_check_region(const struct region *r) in bitmap_check_region() argument 636 if (r->start > r->end || r->group_len == 0 || r->off > r->group_len) in bitmap_check_region() 639 if (r->end >= r->nbits) in bitmap_check_region() 701 static const char *bitmap_parse_region(const char *str, struct region *r) in bitmap_parse_region() argument 703 unsigned int lastbit = r->nbits - 1; in bitmap_parse_region() 706 r->start = 0; in bitmap_parse_region() 707 r->end = lastbit; in bitmap_parse_region() [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() 47 r = (r * 725861) % 6599; 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()
|
D | test_sort.c | 20 int *a, i, r = 1; in test_sort() local 26 r = (r * 725861) % 6599; in test_sort() 27 a[i] = r; in test_sort()
|
D | plist.c | 223 unsigned int r = local_clock(); in plist_test() local 231 r = r * 193939 % 47629; in plist_test() 232 i = r % ARRAY_SIZE(test_node); in plist_test() 234 r = r * 193939 % 47629; in plist_test() 235 test_node[i].prio = r % 99; in plist_test()
|
D | inflate.c | 347 struct huft r; /* table entry for structure assignment */ in huft_build() local 507 r.b = (uch)l; /* bits to dump before this table */ in huft_build() 508 r.e = (uch)(16 + j); /* bits in this table */ in huft_build() 509 r.v.t = q; /* pointer to this table */ in huft_build() 511 u[h-1][j] = r; /* connect to last table */ in huft_build() 518 r.b = (uch)(k - w); in huft_build() 520 r.e = 99; /* out of values--invalid code */ in huft_build() 523 r.e = (uch)(*p < 256 ? 16 : 15); /* 256 is end-of-block code */ in huft_build() 524 r.v.n = (ush)(*p); /* simple code is just the value */ in huft_build() 529 r.e = (uch)e[*p - s]; /* non-simple--look up in lists */ in huft_build() [all …]
|
D | kobject_uevent.c | 120 int r = -EINVAL; in kobject_action_args() local 173 r = 0; in kobject_action_args() 175 if (r) in kobject_action_args() 179 return r; in kobject_action_args() 199 int r; in kobject_synth_uevent() local 201 r = kobject_action_type(buf, count, &action, &action_args); in kobject_synth_uevent() 202 if (r) { in kobject_synth_uevent() 208 r = kobject_uevent_env(kobj, action, no_uuid_envp); in kobject_synth_uevent() 212 r = kobject_action_args(action_args, in kobject_synth_uevent() 214 if (r == -EINVAL) { in kobject_synth_uevent() [all …]
|
D | string.c | 626 const char *r; in strcspn() local 630 for (r = reject; *r != '\0'; ++r) { in strcspn() 631 if (*p == *r) in strcspn() 1122 u8 *r; in memchr_inv() local 1125 r = check_bytes8(start, value, prefix); in memchr_inv() 1126 if (r) in memchr_inv() 1127 return r; in memchr_inv()
|
D | test_hexdump.c | 167 int ae, he, e, f, r; in test_hexdump_overflow() local 174 r = hex_dump_to_buffer(data_b, len, rs, gs, buf, buflen, ascii); in test_hexdump_overflow() 195 a = r == e && !memcmp(test, buf, TEST_HEXDUMP_BUF_SIZE); in test_hexdump_overflow() 202 pr_err("Result: %d '%s'\n", r, buf); in test_hexdump_overflow()
|
D | decompress_unlzo.c | 103 u8 r = 0; in unlzo() local 234 r = lzo1x_decompress_safe((u8 *) in_buf, src_len, in unlzo() 237 if (r != LZO_E_OK || dst_len != tmp) { in unlzo()
|
D | test_vmalloc.c | 295 unsigned int r; in pcpu_alloc_test() local 297 get_random_bytes(&r, sizeof(i)); in pcpu_alloc_test() 298 size = (r % (PAGE_SIZE / 4)) + 1; in pcpu_alloc_test() 303 get_random_bytes(&r, sizeof(i)); in pcpu_alloc_test()
|
/lib/mpi/ |
D | mpih-div.c | 33 mpi_limb_t n1, n0, r; in mpihelp_mod_1() local 71 r = n1 >> (BITS_PER_MPI_LIMB - normalization_steps); in mpihelp_mod_1() 81 UDIV_QRNND_PREINV(dummy, r, r, in mpihelp_mod_1() 87 UDIV_QRNND_PREINV(dummy, r, r, in mpihelp_mod_1() 90 return r >> normalization_steps; in mpihelp_mod_1() 107 r = dividend_ptr[i]; in mpihelp_mod_1() 109 if (r >= divisor_limb) in mpihelp_mod_1() 110 r = 0; in mpihelp_mod_1() 116 UDIV_QRNND_PREINV(dummy, r, r, in mpihelp_mod_1() 119 return r; in mpihelp_mod_1() [all …]
|
D | mpi-mod.c | 95 void mpi_mod_barrett(MPI r, MPI x, mpi_barrett_t ctx) in mpi_mod_barrett() argument 106 mpi_mod(r, x, m); in mpi_mod_barrett() 134 mpi_sub(r, r1, r2); in mpi_mod_barrett() 136 if (mpi_has_sign(r)) { in mpi_mod_barrett() 142 mpi_add(r, r, ctx->r3); in mpi_mod_barrett() 146 while (mpi_cmp(r, m) >= 0) in mpi_mod_barrett() 147 mpi_sub(r, r, m); in mpi_mod_barrett()
|
D | longlong.h | 144 #define udiv_qrnnd(q, r, n1, n0, d) \ argument 147 "=q" ((USItype)(r)) \ 162 #define udiv_qrnnd(q, r, n1, n0, d) \ argument 165 (r) = __r; \ 287 #define udiv_qrnnd(q, r, nh, nl, d) \ argument 290 "=r" ((USItype)(r)) \ 339 #define udiv_qrnnd(q, r, n1, n0, d) \ 342 (r) = __r; \ 379 #define sdiv_qrnnd(q, r, n1, n0, d) \ argument 388 (q) = __xx.__i.__l; (r) = __xx.__i.__h; \ [all …]
|
/lib/math/ |
D | gcd.c | 25 unsigned long r = a | b; in gcd() local 28 return r; in gcd() 32 return r & -r; in gcd() 37 return r & -r; in gcd() 39 return a << __ffs(r); in gcd() 52 unsigned long r = a | b; in gcd() local 55 return r; in gcd() 58 r &= -r; in gcd() 60 while (!(b & r)) in gcd() 62 if (b == r) in gcd() [all …]
|
/lib/crypto/ |
D | poly1305-donna32.c | 17 key->key.r[0] = (get_unaligned_le32(&raw_key[0])) & 0x3ffffff; in poly1305_core_setkey() 18 key->key.r[1] = (get_unaligned_le32(&raw_key[3]) >> 2) & 0x3ffff03; in poly1305_core_setkey() 19 key->key.r[2] = (get_unaligned_le32(&raw_key[6]) >> 4) & 0x3ffc0ff; in poly1305_core_setkey() 20 key->key.r[3] = (get_unaligned_le32(&raw_key[9]) >> 6) & 0x3f03fff; in poly1305_core_setkey() 21 key->key.r[4] = (get_unaligned_le32(&raw_key[12]) >> 8) & 0x00fffff; in poly1305_core_setkey() 24 key->precomputed_s.r[0] = key->key.r[1] * 5; in poly1305_core_setkey() 25 key->precomputed_s.r[1] = key->key.r[2] * 5; in poly1305_core_setkey() 26 key->precomputed_s.r[2] = key->key.r[3] * 5; in poly1305_core_setkey() 27 key->precomputed_s.r[3] = key->key.r[4] * 5; in poly1305_core_setkey() 47 r0 = key->key.r[0]; in poly1305_core_blocks() [all …]
|
D | blake2s-generic.c | 68 #define G(r, i, a, b, c, d) do { \ in blake2s_compress_generic() argument 69 a += b + m[blake2s_sigma[r][2 * i + 0]]; \ in blake2s_compress_generic() 73 a += b + m[blake2s_sigma[r][2 * i + 1]]; \ in blake2s_compress_generic() 79 #define ROUND(r) do { \ in blake2s_compress_generic() argument 80 G(r, 0, v[0], v[ 4], v[ 8], v[12]); \ in blake2s_compress_generic() 81 G(r, 1, v[1], v[ 5], v[ 9], v[13]); \ in blake2s_compress_generic() 82 G(r, 2, v[2], v[ 6], v[10], v[14]); \ in blake2s_compress_generic() 83 G(r, 3, v[3], v[ 7], v[11], v[15]); \ in blake2s_compress_generic() 84 G(r, 4, v[0], v[ 5], v[10], v[15]); \ in blake2s_compress_generic() 85 G(r, 5, v[1], v[ 6], v[11], v[12]); \ in blake2s_compress_generic() [all …]
|
/lib/reed_solomon/ |
D | test_rslib.c | 78 uint16_t *r; /* received word */ member 123 ws->r = ws->c + nn; in alloc_ws() 124 ws->s = ws->r + nn; in alloc_ws() 160 uint16_t *r = ws->r; in get_rcw_we() local 173 memcpy(r, c, len * sizeof(*r)); in get_rcw_we() 190 r[errloc] ^= errval; in get_rcw_we() 213 r[errloc] ^= errval; in get_rcw_we() 269 uint16_t *r = ws->r; in test_uc() local 279 derrs = decode_rs16(rs, r, r + dlen, dlen, in test_uc() 281 fix_err(r, derrs, corr, derrlocs); in test_uc() [all …]
|
D | decode_rs.c | 15 int i, j, r, k, pad; variable 132 r = no_eras; 134 while (++r <= nroots) { /* r is the step number */ 137 for (i = 0; i < r; i++) { 138 if ((lambda[i] != 0) && (s[r - i - 1] != nn)) { 142 s[r - i - 1])]; 161 if (2 * el <= r + no_eras - 1) { 162 el = r + no_eras - el;
|
/lib/xz/ |
D | xz_crc32.c | 36 uint32_t r; in xz_crc32_init() local 39 r = i; in xz_crc32_init() 41 r = (r >> 1) ^ (poly & ~((r & 1) - 1)); in xz_crc32_init() 43 xz_crc32_table[i] = r; in xz_crc32_init()
|