Home
last modified time | relevance | path

Searched refs:ret (Results 1 – 25 of 76) sorted by relevance

1234

/lib/
Dtest_siphash.c118 int ret = 0; in siphash_test_init() local
126 ret = -EINVAL; in siphash_test_init()
131 ret = -EINVAL; in siphash_test_init()
136 ret = -EINVAL; in siphash_test_init()
141 ret = -EINVAL; in siphash_test_init()
147 ret = -EINVAL; in siphash_test_init()
152 ret = -EINVAL; in siphash_test_init()
158 ret = -EINVAL; in siphash_test_init()
164 ret = -EINVAL; in siphash_test_init()
169 ret = -EINVAL; in siphash_test_init()
[all …]
Dtest_user_copy.c49 int ret = 0; in test_check_nonzero_user() local
87 ret |= test(copy_to_user(umem, kmem, size), in test_check_nonzero_user()
96 ret |= test(retval != expected, in test_check_nonzero_user()
102 return ret; in test_check_nonzero_user()
108 int ret = 0; in test_copy_struct_from_user() local
113 ret = test(umem_src == NULL, "kmalloc failed"); in test_copy_struct_from_user()
114 if (ret) in test_copy_struct_from_user()
118 ret = test(expected == NULL, "kmalloc failed"); in test_copy_struct_from_user()
119 if (ret) in test_copy_struct_from_user()
124 ret |= test(copy_to_user(umem, umem_src, size), in test_copy_struct_from_user()
[all …]
Dtest_linear_ranges.c125 int ret, i; in range_test_get_value() local
130 ret = linear_range_get_value_array(&testr[0], 2, sel, &val); in range_test_get_value()
131 KUNIT_EXPECT_EQ(test, 0, ret); in range_test_get_value()
136 ret = linear_range_get_value_array(&testr[0], 2, sel, &val); in range_test_get_value()
137 KUNIT_EXPECT_EQ(test, 0, ret); in range_test_get_value()
140 ret = linear_range_get_value_array(&testr[0], 2, sel + 1, &val); in range_test_get_value()
141 KUNIT_EXPECT_NE(test, 0, ret); in range_test_get_value()
146 int ret, i; in range_test_get_selector_high() local
151 ret = linear_range_get_selector_high(&testr[0], range1_vals[i], in range_test_get_selector_high()
153 KUNIT_EXPECT_EQ(test, 0, ret); in range_test_get_selector_high()
[all …]
Dbootconfig.c230 int depth = 0, ret = 0, total = 0; in xbc_node_compose_key_after() local
249 ret = snprintf(buf, size, "%s%s", xbc_node_get_data(node), in xbc_node_compose_key_after()
251 if (ret < 0) in xbc_node_compose_key_after()
252 return ret; in xbc_node_compose_key_after()
253 if (ret > size) { in xbc_node_compose_key_after()
256 size -= ret; in xbc_node_compose_key_after()
257 buf += ret; in xbc_node_compose_key_after()
259 total += ret; in xbc_node_compose_key_after()
448 char *ret; in skip_comment() local
450 ret = strchr(p, '\n'); in skip_comment()
[all …]
Dtest_hmm.c121 int ret; in dmirror_fops_open() local
132 ret = mmu_interval_notifier_insert(&dmirror->notifier, current->mm, in dmirror_fops_open()
134 if (ret) { in dmirror_fops_open()
136 return ret; in dmirror_fops_open()
246 int ret; in dmirror_range_fault() local
250 ret = -EBUSY; in dmirror_range_fault()
256 ret = hmm_range_fault(range); in dmirror_range_fault()
258 if (ret) { in dmirror_range_fault()
259 if (ret == -EBUSY) in dmirror_range_fault()
273 ret = dmirror_do_fault(dmirror, range); in dmirror_range_fault()
[all …]
Dtest_kmod.c297 int ret = 0; in tally_up_work() local
305 ret = tally_work_test(info); in tally_up_work()
306 if (ret) in tally_up_work()
307 err_ret = ret; in tally_up_work()
392 int ret; in try_requests() local
401 ret = try_one_request(test_dev, idx); in try_requests()
402 if (ret) { in try_requests()
530 int ret; in trigger_config_run() local
535 ret = __trigger_config_run(test_dev); in trigger_config_run()
536 if (ret < 0) in trigger_config_run()
[all …]
Dlocking-selftest.c1600 int ret; in ww_test_fail_acquire() local
1605 ret = WWL(&o, &t); in ww_test_fail_acquire()
1608 WARN_ON(ret)) in ww_test_fail_acquire()
1612 ret = WWL(&o, &t); in ww_test_fail_acquire()
1613 WARN_ON(ret != -EALREADY); in ww_test_fail_acquire()
1615 ret = WWT(&o); in ww_test_fail_acquire()
1616 WARN_ON(ret); in ww_test_fail_acquire()
1620 ret = WWL(&o, &t2); in ww_test_fail_acquire()
1621 WARN_ON(ret != -EDEADLK); in ww_test_fail_acquire()
1634 int ret; in ww_test_normal() local
[all …]
Dkfifo.c182 unsigned long ret; in kfifo_copy_from_user() local
192 ret = copy_from_user(fifo->data + off, from, l); in kfifo_copy_from_user()
193 if (unlikely(ret)) in kfifo_copy_from_user()
194 ret = DIV_ROUND_UP(ret + len - l, esize); in kfifo_copy_from_user()
196 ret = copy_from_user(fifo->data, from + l, len - l); in kfifo_copy_from_user()
197 if (unlikely(ret)) in kfifo_copy_from_user()
198 ret = DIV_ROUND_UP(ret, esize); in kfifo_copy_from_user()
205 *copied = len - ret * esize; in kfifo_copy_from_user()
207 return ret; in kfifo_copy_from_user()
214 unsigned long ret; in __kfifo_from_user() local
[all …]
Dseq_buf.c86 int ret; in seq_buf_printf() local
89 ret = seq_buf_vprintf(s, fmt, ap); in seq_buf_printf()
92 return ret; in seq_buf_printf()
117 int ret; in seq_buf_bprintf() local
122 ret = bstr_printf(s->buffer + s->len, len, fmt, binary); in seq_buf_bprintf()
123 if (s->len + ret < s->size) { in seq_buf_bprintf()
124 s->len += ret; in seq_buf_bprintf()
314 int ret; local
327 ret = copy_to_user(ubuf, s->buffer + s->readpos, cnt);
328 if (ret == cnt)
[all …]
Ddecompress_unzstd.c92 static int INIT handle_zstd_error(size_t ret, void (*error)(char *x)) in handle_zstd_error() argument
94 const int err = ZSTD_getErrorCode(ret); in handle_zstd_error()
96 if (!ZSTD_isError(ret)) in handle_zstd_error()
131 size_t ret; in decompress_single() local
142 ret = ZSTD_findFrameCompressedSize(in_buf, in_len); in decompress_single()
143 err = handle_zstd_error(ret, error); in decompress_single()
146 in_len = (long)ret; in decompress_single()
148 ret = ZSTD_decompressDCtx(dctx, out_buf, out_len, in_buf, in_len); in decompress_single()
149 err = handle_zstd_error(ret, error); in decompress_single()
179 size_t ret; in __unzstd() local
[all …]
Dtest_static_keys.c71 bool ret, init; in verify_keys() local
74 ret = static_key_enabled(keys[i].key); in verify_keys()
76 if (ret != (invert ? !init : init)) in verify_keys()
78 ret = keys[i].test_key(); in verify_keys()
80 if (!ret) in verify_keys()
83 if (ret) in verify_keys()
111 int ret; in test_key_func() local
213 ret = verify_keys(static_key_tests, size, false); in test_key_func()
214 if (ret) in test_key_func()
218 ret = verify_keys(static_key_tests, size, true); in test_key_func()
[all …]
Dstmp_device.c40 int ret; in stmp_reset_block() local
44 ret = stmp_clear_poll_bit(reset_addr, STMP_MODULE_SFTRST); in stmp_reset_block()
45 if (unlikely(ret)) in stmp_reset_block()
62 ret = stmp_clear_poll_bit(reset_addr, STMP_MODULE_SFTRST); in stmp_reset_block()
63 if (unlikely(ret)) in stmp_reset_block()
67 ret = stmp_clear_poll_bit(reset_addr, STMP_MODULE_CLKGATE); in stmp_reset_block()
68 if (unlikely(ret)) in stmp_reset_block()
Dparser.c131 int ret; in match_number() local
138 ret = 0; in match_number()
141 ret = -EINVAL; in match_number()
143 ret = -ERANGE; in match_number()
147 return ret; in match_number()
163 int ret; in match_u64int() local
170 ret = kstrtoull(buf, base, &val); in match_u64int()
171 if (!ret) in match_u64int()
174 return ret; in match_u64int()
302 size_t ret = src->to - src->from; in match_strlcpy() local
[all …]
Dkobject_uevent.c69 int ret = -EINVAL; in kobject_action_type() local
92 ret = 0; in kobject_action_type()
96 return ret; in kobject_action_type()
349 int ret = 0; in uevent_net_broadcast_tagged() local
372 ret = netlink_broadcast(usk, skb, 0, 1, GFP_KERNEL); in uevent_net_broadcast_tagged()
374 if (ret == -ENOBUFS || ret == -ESRCH) in uevent_net_broadcast_tagged()
375 ret = 0; in uevent_net_broadcast_tagged()
377 return ret; in uevent_net_broadcast_tagged()
386 int ret = 0; in kobject_uevent_net_broadcast() local
409 ret = uevent_net_broadcast_untagged(env, action_string, in kobject_uevent_net_broadcast()
[all …]
Dcmdline.c129 unsigned long long ret = simple_strtoull(ptr, &endptr, 0); in memparse() local
134 ret <<= 10; in memparse()
138 ret <<= 10; in memparse()
142 ret <<= 10; in memparse()
146 ret <<= 10; in memparse()
150 ret <<= 10; in memparse()
154 ret <<= 10; in memparse()
163 return ret; in memparse()
Dmemweight.c13 size_t ret = 0; in memweight() local
19 ret += hweight8(*bitmap); in memweight()
24 ret += bitmap_weight((unsigned long *)bitmap, in memweight()
35 ret += hweight8(*bitmap); in memweight()
37 return ret; in memweight()
Ddecompress_unlz4.c37 int ret = -1; in unlz4() local
160 ret = LZ4_decompress_fast(inp, outp, dest_len); in unlz4()
161 chunksize = ret; in unlz4()
165 ret = LZ4_decompress_safe(inp, outp, chunksize, dest_len); in unlz4()
166 dest_len = ret; in unlz4()
168 if (ret < 0) { in unlz4()
173 ret = -1; in unlz4()
195 ret = 0; in unlz4()
203 return ret; in unlz4()
Doid_registry.c111 size_t ret; in sprint_oid() local
118 ret = count = snprintf(buffer, bufsize, "%u.%u", n / 40, n % 40); in sprint_oid()
139 ret += count = snprintf(buffer, bufsize, ".%lu", num); in sprint_oid()
146 return ret; in sprint_oid()
165 int ret; in sprint_OID() local
169 ret = sprint_oid(oid_data + oid_index[oid], in sprint_OID()
172 BUG_ON(ret == -EBADMSG); in sprint_OID()
173 return ret; in sprint_OID()
Dhexdump.c143 int ret; in hex_dump_to_buffer() local
168 ret = snprintf(linebuf + lx, linebuflen - lx, in hex_dump_to_buffer()
171 if (ret >= linebuflen - lx) in hex_dump_to_buffer()
173 lx += ret; in hex_dump_to_buffer()
179 ret = snprintf(linebuf + lx, linebuflen - lx, in hex_dump_to_buffer()
182 if (ret >= linebuflen - lx) in hex_dump_to_buffer()
184 lx += ret; in hex_dump_to_buffer()
190 ret = snprintf(linebuf + lx, linebuflen - lx, in hex_dump_to_buffer()
193 if (ret >= linebuflen - lx) in hex_dump_to_buffer()
195 lx += ret; in hex_dump_to_buffer()
Dnodemask.c8 unsigned int ret = __next_node(node, srcp); in __next_node_in() local
10 if (ret == MAX_NUMNODES) in __next_node_in()
11 ret = __first_node(srcp); in __next_node_in()
12 return ret; in __next_node_in()
Dradix-tree.c236 struct radix_tree_node *ret = NULL; in radix_tree_node_alloc() local
251 ret = kmem_cache_alloc(radix_tree_node_cachep, in radix_tree_node_alloc()
253 if (ret) in radix_tree_node_alloc()
263 ret = rtp->nodes; in radix_tree_node_alloc()
264 rtp->nodes = ret->parent; in radix_tree_node_alloc()
271 kmemleak_update_trace(ret); in radix_tree_node_alloc()
274 ret = kmem_cache_alloc(radix_tree_node_cachep, gfp_mask); in radix_tree_node_alloc()
276 BUG_ON(radix_tree_is_internal_node(ret)); in radix_tree_node_alloc()
277 if (ret) { in radix_tree_node_alloc()
278 ret->shift = shift; in radix_tree_node_alloc()
[all …]
Dlogic_pio.c43 int ret = 0; in logic_pio_register_range() local
56 ret = -EEXIST; in logic_pio_register_range()
66 ret = -EFAULT; in logic_pio_register_range()
80 ret = -E2BIG; in logic_pio_register_range()
89 ret = -E2BIG; in logic_pio_register_range()
95 ret = -EINVAL; in logic_pio_register_range()
103 return ret; in logic_pio_register_range()
238 type ret = (type)~0; \
241 ret = _in##bwl(addr); \
246 ret = entry->ops->in(entry->hostdata, \
[all …]
/lib/842/
D842_compress.c156 int ret; in __split_add_bits() local
161 ret = add_bits(p, d >> s, n - s); in __split_add_bits()
162 if (ret) in __split_add_bits()
163 return ret; in __split_add_bits()
224 int ret, i, b = 0; in add_template() local
233 ret = add_bits(p, t[4], OP_BITS); in add_template()
234 if (ret) in add_template()
235 return ret; in add_template()
245 ret = add_bits(p, p->index8[0], I8_BITS); in add_template()
247 ret = add_bits(p, p->data8[0], 64); in add_template()
[all …]
D842_decompress.c70 int ret; in __split_next_bits() local
77 ret = next_bits(p, &tmp, n - s); in __split_next_bits()
78 if (ret) in __split_next_bits()
79 return ret; in __split_next_bits()
80 ret = next_bits(p, d, s); in __split_next_bits()
81 if (ret) in __split_next_bits()
82 return ret; in __split_next_bits()
134 int ret; in do_data() local
139 ret = next_bits(p, &v, n * 8); in do_data()
140 if (ret) in do_data()
[all …]
/lib/xz/
Dxz_dec_stream.c220 enum xz_ret ret; in dec_block() local
227 ret = xz_dec_bcj_run(s->bcj, s->lzma2, b); in dec_block()
230 ret = xz_dec_lzma2_run(s->lzma2, b); in dec_block()
248 if (ret == XZ_STREAM_END) { in dec_block()
277 return ret; in dec_block()
298 enum xz_ret ret; in dec_index() local
301 ret = dec_vli(s, b->in, &b->in_pos, b->in_size); in dec_index()
302 if (ret != XZ_STREAM_END) { in dec_index()
304 return ret; in dec_index()
451 enum xz_ret ret; in dec_block_header() local
[all …]

1234