Home
last modified time | relevance | path

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

1234

/lib/
Dtest_siphash.c117 int ret = 0; in siphash_test_init() local
125 ret = -EINVAL; in siphash_test_init()
130 ret = -EINVAL; in siphash_test_init()
135 ret = -EINVAL; in siphash_test_init()
140 ret = -EINVAL; in siphash_test_init()
146 ret = -EINVAL; in siphash_test_init()
151 ret = -EINVAL; in siphash_test_init()
157 ret = -EINVAL; in siphash_test_init()
163 ret = -EINVAL; in siphash_test_init()
168 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 …]
Dtest_hmm.c164 int ret; in dmirror_fops_open() local
175 ret = mmu_interval_notifier_insert(&dmirror->notifier, current->mm, in dmirror_fops_open()
177 if (ret) { in dmirror_fops_open()
179 return ret; in dmirror_fops_open()
293 int ret; in dmirror_range_fault() local
297 ret = -EBUSY; in dmirror_range_fault()
303 ret = hmm_range_fault(range); in dmirror_range_fault()
305 if (ret) { in dmirror_range_fault()
306 if (ret == -EBUSY) in dmirror_range_fault()
320 ret = dmirror_do_fault(dmirror, range); in dmirror_range_fault()
[all …]
Dbootconfig.c295 int depth = 0, ret = 0, total = 0; in xbc_node_compose_key_after() local
314 ret = snprintf(buf, size, "%s%s", xbc_node_get_data(node), in xbc_node_compose_key_after()
316 if (ret < 0) in xbc_node_compose_key_after()
317 return ret; in xbc_node_compose_key_after()
318 if (ret > size) { in xbc_node_compose_key_after()
321 size -= ret; in xbc_node_compose_key_after()
322 buf += ret; in xbc_node_compose_key_after()
324 total += ret; in xbc_node_compose_key_after()
513 char *ret; in skip_comment() local
515 ret = strchr(p, '\n'); in skip_comment()
[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 …]
Dasn1_encoder.c93 int ret = 0; in asn1_encode_oid_digit() local
123 ret = -EINVAL; in asn1_encode_oid_digit()
128 return ret; in asn1_encode_oid_digit()
146 int i, ret; in asn1_encode_oid() local
168 ret = asn1_encode_oid_digit(&d, &data_len, oid[i]); in asn1_encode_oid()
169 if (ret < 0) in asn1_encode_oid()
170 return ERR_PTR(ret); in asn1_encode_oid()
274 int ret; in asn1_encode_tag() local
301 ret = asn1_encode_length(&data, &data_len, len); in asn1_encode_tag()
302 if (ret < 0) in asn1_encode_tag()
[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.c88 static int INIT handle_zstd_error(size_t ret, void (*error)(char *x)) in handle_zstd_error() argument
90 const zstd_error_code err = zstd_get_error_code(ret); in handle_zstd_error()
92 if (!zstd_is_error(ret)) in handle_zstd_error()
131 size_t ret; in decompress_single() local
142 ret = zstd_find_frame_compressed_size(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_decompress_dctx(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 …]
Dlocking-selftest.c1671 int ret; in ww_test_fail_acquire() local
1676 ret = WWL(&o, &t); in ww_test_fail_acquire()
1679 WARN_ON(ret)) in ww_test_fail_acquire()
1683 ret = WWL(&o, &t); in ww_test_fail_acquire()
1684 WARN_ON(ret != -EALREADY); in ww_test_fail_acquire()
1686 ret = WWT(&o); in ww_test_fail_acquire()
1687 WARN_ON(ret); in ww_test_fail_acquire()
1691 ret = WWL(&o, &t2); in ww_test_fail_acquire()
1692 WARN_ON(ret != -EDEADLK); in ww_test_fail_acquire()
1721 int ret; in ww_test_normal() local
[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.c133 int ret; in match_number() local
140 ret = 0; in match_number()
143 ret = -EINVAL; in match_number()
145 ret = -ERANGE; in match_number()
149 return ret; in match_number()
167 int ret; in match_u64int() local
174 ret = kstrtoull(buf, base, &val); in match_u64int()
175 if (!ret) in match_u64int()
178 return ret; in match_u64int()
336 size_t ret = src->to - src->from; in match_strlcpy() local
[all …]
Dtest_kprobes.c151 unsigned long ret = regs_return_value(regs); in return_handler() local
154 KUNIT_EXPECT_EQ(current_test, ret, rand1 / div_factor); in return_handler()
177 unsigned long ret = regs_return_value(regs); in return_handler2() local
179 KUNIT_EXPECT_EQ(current_test, ret, (rand1 / div_factor) + 1); in return_handler2()
218 int i, ret; in stacktrace_return_handler() local
228 ret = stack_trace_save(stack_buf, STACK_BUF_SIZE, 0); in stacktrace_return_handler()
229 KUNIT_EXPECT_NE(current_test, ret, 0); in stacktrace_return_handler()
231 for (i = 0; i < ret; i++) { in stacktrace_return_handler()
235 KUNIT_EXPECT_NE(current_test, i, ret); in stacktrace_return_handler()
242 ret = stack_trace_save_regs(regs, stack_buf, STACK_BUF_SIZE, 0); in stacktrace_return_handler()
[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 …]
Dtest_firmware.c223 int ret; in __test_firmware_config_init() local
225 ret = __kstrncpy(&test_fw_config->name, TEST_FIRMWARE_NAME, in __test_firmware_config_init()
227 if (ret < 0) in __test_firmware_config_init()
246 return ret; in __test_firmware_config_init()
253 int ret; in reset_store() local
259 ret = __test_firmware_config_init(); in reset_store()
260 if (ret < 0) { in reset_store()
261 ret = -ENOMEM; in reset_store()
263 ret); in reset_store()
268 ret = count; in reset_store()
[all …]
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()
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()
Dhexdump.c135 int ret; in hex_dump_to_buffer() local
160 ret = snprintf(linebuf + lx, linebuflen - lx, in hex_dump_to_buffer()
163 if (ret >= linebuflen - lx) in hex_dump_to_buffer()
165 lx += ret; in hex_dump_to_buffer()
171 ret = snprintf(linebuf + lx, linebuflen - lx, in hex_dump_to_buffer()
174 if (ret >= linebuflen - lx) in hex_dump_to_buffer()
176 lx += ret; in hex_dump_to_buffer()
182 ret = snprintf(linebuf + lx, linebuflen - lx, in hex_dump_to_buffer()
185 if (ret >= linebuflen - lx) in hex_dump_to_buffer()
187 lx += ret; in hex_dump_to_buffer()
Dcmdline.c154 unsigned long long ret = simple_strtoull(ptr, &endptr, 0); in memparse() local
159 ret <<= 10; in memparse()
163 ret <<= 10; in memparse()
167 ret <<= 10; in memparse()
171 ret <<= 10; in memparse()
175 ret <<= 10; in memparse()
179 ret <<= 10; in memparse()
189 return ret; in memparse()
Doid_registry.c135 size_t ret; in sprint_oid() local
142 ret = count = snprintf(buffer, bufsize, "%u.%u", n / 40, n % 40); in sprint_oid()
163 ret += count = snprintf(buffer, bufsize, ".%lu", num); in sprint_oid()
170 return ret; in sprint_oid()
189 int ret; in sprint_OID() local
193 ret = sprint_oid(oid_data + oid_index[oid], in sprint_OID()
196 BUG_ON(ret == -EBADMSG); in sprint_OID()
197 return ret; in sprint_OID()
/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