/lib/ |
D | hweight.c | 21 unsigned int res = w - ((w >> 1) & 0x55555555); in __sw_hweight32() 22 res = (res & 0x33333333) + ((res >> 2) & 0x33333333); in __sw_hweight32() 23 res = (res + (res >> 4)) & 0x0F0F0F0F; in __sw_hweight32() 24 res = res + (res >> 8); in __sw_hweight32() 25 return (res + (res >> 16)) & 0x000000FF; in __sw_hweight32() 32 unsigned int res = w - ((w >> 1) & 0x5555); in __sw_hweight16() local 33 res = (res & 0x3333) + ((res >> 2) & 0x3333); in __sw_hweight16() 34 res = (res + (res >> 4)) & 0x0F0F; in __sw_hweight16() 35 return (res + (res >> 8)) & 0x00FF; in __sw_hweight16() 41 unsigned int res = w - ((w >> 1) & 0x55); in __sw_hweight8() local [all …]
|
D | kstrtox.c | 53 unsigned long long res; in _parse_integer_limit() local 56 res = 0; in _parse_integer_limit() 76 if (unlikely(res & (~0ull << 60))) { in _parse_integer_limit() 77 if (res > div_u64(ULLONG_MAX - val, base)) in _parse_integer_limit() 80 res = res * base + val; in _parse_integer_limit() 84 *p = res; in _parse_integer_limit() 93 static int _kstrtoull(const char *s, unsigned int base, unsigned long long *res) in _kstrtoull() argument 109 *res = _res; in _kstrtoull() 128 int kstrtoull(const char *s, unsigned int base, unsigned long long *res) in kstrtoull() argument 132 return _kstrtoull(s, base, res); in kstrtoull() [all …]
|
D | devres.c | 16 void devm_ioremap_release(struct device *dev, void *res) in devm_ioremap_release() argument 18 iounmap(*(void __iomem **)res); in devm_ioremap_release() 21 static int devm_ioremap_match(struct device *dev, void *res, void *match_data) in devm_ioremap_match() argument 23 return *(void **)res == match_data; in devm_ioremap_match() 136 __devm_ioremap_resource(struct device *dev, const struct resource *res, in __devm_ioremap_resource() argument 145 if (!res || resource_type(res) != IORESOURCE_MEM) { in __devm_ioremap_resource() 150 if (type == DEVM_IOREMAP && res->flags & IORESOURCE_MEM_NONPOSTED) in __devm_ioremap_resource() 153 size = resource_size(res); in __devm_ioremap_resource() 155 if (res->name) in __devm_ioremap_resource() 157 dev_name(dev), res->name); in __devm_ioremap_resource() [all …]
|
D | strncpy_from_user.c | 32 unsigned long res = 0; in do_strncpy_from_user() local 41 unsafe_get_user(c, (unsigned long __user *)(src+res), byte_at_a_time); in do_strncpy_from_user() 58 *(unsigned long *)(dst+res) = c & mask; in do_strncpy_from_user() 59 return res + find_zero(data); in do_strncpy_from_user() 62 *(unsigned long *)(dst+res) = c; in do_strncpy_from_user() 64 res += sizeof(unsigned long); in do_strncpy_from_user() 72 unsafe_get_user(c,src+res, efault); in do_strncpy_from_user() 73 dst[res] = c; in do_strncpy_from_user() 75 return res; in do_strncpy_from_user() 76 res++; in do_strncpy_from_user() [all …]
|
D | bitfield_kunit.c | 11 #define CHECK_ENC_GET_U(tp, v, field, res) do { \ argument 16 KUNIT_ASSERT_FALSE_MSG(context, _res != res, \ 17 "u" #tp "_encode_bits(" #v ", " #field ") is 0x%llx != " #res "\n", \ 24 #define CHECK_ENC_GET_LE(tp, v, field, res) do { \ argument 30 _res != cpu_to_le##tp(res), \ 33 (u64)(res)); \ 39 #define CHECK_ENC_GET_BE(tp, v, field, res) do { \ argument 45 _res != cpu_to_be##tp(res), \ 48 (u64)(res)); \ 54 #define CHECK_ENC_GET(tp, v, field, res) do { \ argument [all …]
|
D | strnlen_user.c | 26 unsigned long align, res = 0; in do_strnlen_user() local 45 return res + find_zero(data) + 1 - align; in do_strnlen_user() 47 res += sizeof(unsigned long); in do_strnlen_user() 52 unsafe_get_user(c, (unsigned long __user *)(src+res), efault); in do_strnlen_user() 54 res -= align; in do_strnlen_user() 60 if (res >= count) in do_strnlen_user()
|
D | usercopy.c | 13 unsigned long res = n; in _copy_from_user() local 23 res = raw_copy_from_user(to, from, n); in _copy_from_user() 25 if (unlikely(res)) in _copy_from_user() 26 memset(to + (n - res), 0, res); in _copy_from_user() 27 return res; in _copy_from_user()
|
D | string.c | 184 long res = 0; in strscpy() local 208 c = read_word_at_a_time(src+res); in strscpy() 212 *(unsigned long *)(dest+res) = c & zero_bytemask(data); in strscpy() 213 return res + find_zero(data); in strscpy() 215 *(unsigned long *)(dest+res) = c; in strscpy() 216 res += sizeof(unsigned long); in strscpy() 224 c = src[res]; in strscpy() 225 dest[res] = c; in strscpy() 227 return res; in strscpy() 228 res++; in strscpy() [all …]
|
D | digsig.c | 78 MPI in = NULL, res = NULL, pkey[2]; in digsig_verify_rsa() local 141 res = mpi_alloc(mpi_get_nlimbs(in) * 2); in digsig_verify_rsa() 142 if (!res) in digsig_verify_rsa() 145 err = mpi_powm(res, in, pkey[1], pkey[0]); in digsig_verify_rsa() 149 if (mpi_get_nlimbs(res) * BYTES_PER_MPI_LIMB > mlen) { in digsig_verify_rsa() 154 p = mpi_get_buffer(res, &l, NULL); in digsig_verify_rsa() 174 mpi_free(res); in digsig_verify_rsa()
|
D | cmdline.c | 110 int res, i = 1; in get_options() local 115 res = get_option((char **)&str, pint); in get_options() 116 if (res == 0) in get_options() 118 if (res == 3) { in get_options() 133 if (res == 1) in get_options()
|
D | kstrtox.h | 7 unsigned int _parse_integer_limit(const char *s, unsigned int base, unsigned long long *res, 9 unsigned int _parse_integer(const char *s, unsigned int base, unsigned long long *res);
|
D | test-kstrtox.c | 51 type res; \ 54 rv = fn(t->str, t->base, &res); \ 60 if (res != t->expected_res) { \ 62 t->str, t->base, t->expected_res, res); \
|
D | string_helpers.c | 624 int i, res; in kstrdup_quotable_cmdline() local 630 res = get_cmdline(task, buffer, PAGE_SIZE - 1); in kstrdup_quotable_cmdline() 631 buffer[res] = '\0'; in kstrdup_quotable_cmdline() 634 while (--res >= 0 && buffer[res] == '\0') in kstrdup_quotable_cmdline() 638 for (i = 0; i <= res; i++) in kstrdup_quotable_cmdline()
|
D | logic_iomem.c | 12 const struct resource *res; member 62 rreg->res = resource; in logic_iomem_add_region() 94 if (rreg->res->start > offset) in ioremap() 96 if (rreg->res->end < offset + size - 1) in ioremap() 111 offs = rreg->ops->map(offset - found->res->start, in ioremap()
|
D | seq_buf.c | 274 int res = -1; local 283 res = end - buf; 286 seq_buf_commit(s, res); 288 return res;
|
D | iov_iter.c | 883 size_t res = 0; in copy_page_to_iter() local 891 res += n; in copy_page_to_iter() 901 return res; in copy_page_to_iter() 1282 unsigned long res = 0; in iov_iter_alignment_iovec() local 1290 res |= (unsigned long)i->iov[k].iov_base + skip; in iov_iter_alignment_iovec() 1293 res |= len; in iov_iter_alignment_iovec() 1299 return res; in iov_iter_alignment_iovec() 1304 unsigned res = 0; in iov_iter_alignment_bvec() local 1311 res |= (unsigned long)i->bvec[k].bv_offset + skip; in iov_iter_alignment_bvec() 1314 res |= len; in iov_iter_alignment_bvec() [all …]
|
/lib/kunit/ |
D | kunit-test.c | 117 static int fake_resource_init(struct kunit_resource *res, void *context) in fake_resource_init() argument 121 res->data = &ctx->is_resource_initialized; in fake_resource_init() 126 static void fake_resource_free(struct kunit_resource *res) in fake_resource_free() argument 128 bool *is_resource_initialized = res->data; in fake_resource_free() 145 struct kunit_resource *res; in kunit_resource_test_alloc_resource() local 148 res = kunit_alloc_and_get_resource(&ctx->test, in kunit_resource_test_alloc_resource() 154 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, res); in kunit_resource_test_alloc_resource() 157 (bool *)res->data); in kunit_resource_test_alloc_resource() 158 KUNIT_EXPECT_TRUE(test, list_is_last(&res->node, &ctx->test.resources)); in kunit_resource_test_alloc_resource() 159 KUNIT_EXPECT_PTR_EQ(test, free, res->free); in kunit_resource_test_alloc_resource() [all …]
|
D | test.c | 600 struct kunit_resource *res, in kunit_add_resource() argument 606 res->free = free; in kunit_add_resource() 607 kref_init(&res->refcount); in kunit_add_resource() 610 ret = init(res, data); in kunit_add_resource() 614 res->data = data; in kunit_add_resource() 618 list_add_tail(&res->node, &test->resources); in kunit_add_resource() 629 struct kunit_resource *res, in kunit_add_named_resource() argument 644 res->name = name; in kunit_add_named_resource() 646 return kunit_add_resource(test, init, free, res, data); in kunit_add_named_resource() 656 struct kunit_resource *res; in kunit_alloc_and_get_resource() local [all …]
|
D | string-stream.c | 21 static int string_stream_fragment_init(struct kunit_resource *res, in string_stream_fragment_init() argument 36 res->data = frag; in string_stream_fragment_init() 41 static void string_stream_fragment_free(struct kunit_resource *res) in string_stream_fragment_free() argument 43 struct string_stream_fragment *frag = res->data; in string_stream_fragment_free() 172 static int string_stream_init(struct kunit_resource *res, void *context) in string_stream_init() argument 181 res->data = stream; in string_stream_init() 190 static void string_stream_free(struct kunit_resource *res) in string_stream_free() argument 192 struct string_stream *stream = res->data; in string_stream_free()
|
D | executor_test.c | 106 static void kfree_res_free(struct kunit_resource *res) in kfree_res_free() argument 108 kfree(res->data); in kfree_res_free()
|
/lib/mpi/ |
D | mpi-pow.c | 24 int mpi_powm(MPI res, MPI base, MPI exp, MPI mod) in mpi_powm() argument 46 rp = res->d; in mpi_powm() 55 res->nlimbs = (msize == 1 && mod->d[0] == 1) ? 0 : 1; in mpi_powm() 56 if (res->nlimbs) { in mpi_powm() 57 if (mpi_resize(res, 1) < 0) in mpi_powm() 59 rp = res->d; in mpi_powm() 62 res->sign = 0; in mpi_powm() 99 res->nlimbs = 0; in mpi_powm() 100 res->sign = 0; in mpi_powm() 104 if (res->alloced < size) { in mpi_powm() [all …]
|
/lib/vdso/ |
D | gettimeofday.c | 274 struct old_timespec32 *res) in __cvdso_clock_gettime32_data() argument 282 return clock_gettime32_fallback(clock, res); in __cvdso_clock_gettime32_data() 285 res->tv_sec = ts.tv_sec; in __cvdso_clock_gettime32_data() 286 res->tv_nsec = ts.tv_nsec; in __cvdso_clock_gettime32_data() 292 __cvdso_clock_gettime32(clockid_t clock, struct old_timespec32 *res) in __cvdso_clock_gettime32() argument 294 return __cvdso_clock_gettime32_data(__arch_get_vdso_data(), clock, res); in __cvdso_clock_gettime32() 358 struct __kernel_timespec *res) in __cvdso_clock_getres_common() argument 390 if (likely(res)) { in __cvdso_clock_getres_common() 391 res->tv_sec = 0; in __cvdso_clock_getres_common() 392 res->tv_nsec = ns; in __cvdso_clock_getres_common() [all …]
|
/lib/math/ |
D | div64.c | 35 uint64_t res, d = 1; in __div64_32() local 39 res = 0; in __div64_32() 42 res = (uint64_t) high << 32; in __div64_32() 54 res += d; in __div64_32() 60 *n = res; in __div64_32() 199 u64 res = 0, div, rem; in mul_u64_u64_div_u64() local 220 res = div * a; in mul_u64_u64_div_u64() 229 return res; in mul_u64_u64_div_u64() 233 return res + div64_u64(a * b, c); in mul_u64_u64_div_u64()
|
/lib/fonts/ |
D | fonts.c | 112 int i, c, cc, res; in get_default_font() local 134 res = (xres / f->width) * (yres / f->height) / 1000; in get_default_font() 135 if (res > 20) in get_default_font() 136 c += 20 - res; in get_default_font()
|
/lib/zlib_deflate/ |
D | defutil.h | 303 register unsigned res = 0; in bi_reverse() local 305 res |= code & 1; in bi_reverse() 306 code >>= 1, res <<= 1; in bi_reverse() 308 return res >> 1; in bi_reverse()
|