/lib/ |
D | refcount.c | 64 bool refcount_add_not_zero_checked(unsigned int i, refcount_t *r) in refcount_add_not_zero_checked() argument 66 unsigned int new, val = atomic_read(&r->refs); in refcount_add_not_zero_checked() 79 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &val, new)); in refcount_add_not_zero_checked() 103 void refcount_add_checked(unsigned int i, refcount_t *r) in refcount_add_checked() argument 105 WARN_ONCE(!refcount_add_not_zero_checked(i, r), "refcount_t: addition on 0; use-after-free.\n"); in refcount_add_checked() 121 bool refcount_inc_not_zero_checked(refcount_t *r) in refcount_inc_not_zero_checked() argument 123 unsigned int new, val = atomic_read(&r->refs); in refcount_inc_not_zero_checked() 134 } while (!atomic_try_cmpxchg_relaxed(&r->refs, &val, new)); in refcount_inc_not_zero_checked() 154 void refcount_inc_checked(refcount_t *r) in refcount_inc_checked() argument 156 WARN_ONCE(!refcount_inc_not_zero_checked(r), "refcount_t: increment on 0; use-after-free.\n"); in refcount_inc_checked() [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 | 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 | 196 uint32_t w, r[BCH_ECC_MAX_WORDS]; in encode_bch() local 197 const size_t r_bytes = BCH_ECC_WORDS(bch) * sizeof(*r); in encode_bch() 204 if (WARN_ON(r_bytes > sizeof(r))) in encode_bch() 228 memcpy(r, bch->ecc_buf, r_bytes); in encode_bch() 243 w = r[0]^cpu_to_be32(*pdata++); in encode_bch() 250 r[i] = r[i+1]^p0[i]^p1[i]^p2[i]^p3[i]; in encode_bch() 252 r[l] = p0[l]^p1[l]^p2[l]^p3[l]; in encode_bch() 254 memcpy(bch->ecc_buf, r, r_bytes); in encode_bch() 447 int rem, c, r, p, k, param[BCH_MAX_M]; in solve_linear_system() local 457 for (r = p; r < m; r++) { in solve_linear_system() [all …]
|
D | bitmap.c | 514 static int bitmap_set_region(const struct region *r, in bitmap_set_region() argument 519 if (r->end >= nbits) in bitmap_set_region() 522 for (start = r->start; start <= r->end; start += r->group_len) in bitmap_set_region() 523 bitmap_set(bitmap, start, min(r->end - start + 1, r->off)); in bitmap_set_region() 528 static int bitmap_check_region(const struct region *r) in bitmap_check_region() argument 530 if (r->start > r->end || r->group_len == 0 || r->off > r->group_len) in bitmap_check_region() 578 static const char *bitmap_parse_region(const char *str, struct region *r) in bitmap_parse_region() argument 580 str = bitmap_getnum(str, &r->start); in bitmap_parse_region() 590 str = bitmap_getnum(str + 1, &r->end); in bitmap_parse_region() 600 str = bitmap_getnum(str + 1, &r->off); 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 | 17 int *a, i, r = 1, err = -ENOMEM; in test_sort_init() local 24 r = (r * 725861) % 6599; in test_sort_init() 25 a[i] = r; in test_sort_init()
|
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 | 587 const char *r; in strcspn() local 591 for (r = reject; *r != '\0'; ++r) { in strcspn() 592 if (*p == *r) in strcspn() 1053 u8 *r; in memchr_inv() local 1056 r = check_bytes8(start, value, prefix); in memchr_inv() 1057 if (r) in memchr_inv() 1058 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 | 104 u8 r = 0; in unlzo() local 235 r = lzo1x_decompress_safe((u8 *) in_buf, src_len, in unlzo() 238 if (r != LZO_E_OK || dst_len != tmp) { in unlzo()
|
D | vsprintf.c | 185 char *put_dec_trunc8(char *buf, unsigned r) in put_dec_trunc8() argument 190 if (r < 100) in put_dec_trunc8() 194 q = (r * (u64)0x28f5c29) >> 32; in put_dec_trunc8() 195 *((u16 *)buf) = decpair[r - 100*q]; in put_dec_trunc8() 203 r = (q * (u64)0x28f5c29) >> 32; in put_dec_trunc8() 204 *((u16 *)buf) = decpair[q - 100*r]; in put_dec_trunc8() 208 if (r < 100) in put_dec_trunc8() 212 q = (r * 0x147b) >> 19; in put_dec_trunc8() 213 *((u16 *)buf) = decpair[r - 100*q]; in put_dec_trunc8() 217 r = q; in put_dec_trunc8() [all …]
|
D | test_vmalloc.c | 307 unsigned int r; in pcpu_alloc_test() local 309 get_random_bytes(&r, sizeof(i)); in pcpu_alloc_test() 310 size = (r % (PAGE_SIZE / 4)) + 1; in pcpu_alloc_test() 315 get_random_bytes(&r, sizeof(i)); in pcpu_alloc_test()
|
D | xxhash.c | 52 #define xxh_rotl32(x, r) ((x << r) | (x >> (32 - r))) argument 53 #define xxh_rotl64(x, r) ((x << r) | (x >> (64 - r))) argument
|
/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/mpi/ |
D | mpih-div.c | 105 mpi_limb_t r; in mpihelp_divrem() local 118 r = n0 + d1; in mpihelp_divrem() 119 if (r < d1) { /* Carry in the addition? */ in mpihelp_divrem() 120 add_ssaaaa(n1, n0, r - d0, in mpihelp_divrem() 128 udiv_qrnnd(q, r, n1, n0, d1); in mpihelp_divrem() 134 if (n1 > r || (n1 == r && n0 > n2)) { in mpihelp_divrem() 138 r += d1; in mpihelp_divrem() 139 if (r >= d1) /* If not carry, test Q again. */ in mpihelp_divrem() 144 sub_ddmmss(n1, n0, r, n2, n1, n0); in mpihelp_divrem() 189 mpi_limb_t r; in mpihelp_divrem() local [all …]
|
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/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()
|
/lib/842/ |
D | 842_compress.c | 305 static int add_repeat_template(struct sw842_param *p, u8 r) in add_repeat_template() argument 310 if (!r || --r > REPEAT_BITS_MAX) in add_repeat_template() 317 ret = add_bits(p, r, REPEAT_BITS); in add_repeat_template()
|
/lib/zstd/ |
D | huf_compress.c | 396 U32 r = BIT_highbit32(count[n] + 1); in HUF_sort() local 397 rank[r].base++; in HUF_sort() 405 U32 const r = BIT_highbit32(c + 1) + 1; in HUF_sort() local 406 U32 pos = rank[r].curr++; in HUF_sort() 407 while ((pos > rank[r].base) && (c > huffNode[pos - 1].count)) in HUF_sort()
|
/lib/crypto/ |
D | des.c | 25 #define ROL(x, r) ((x) = rol32((x), (r))) argument 26 #define ROR(x, r) ((x) = ror32((x), (r))) argument
|