Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 25 of 1427) sorted by relevance

12345678910>>...58

/linux/tools/testing/selftests/memfd/
A Dmemfd_test.c274 fd, in mfd_assert_mmap_shared()
292 fd, in mfd_assert_mmap_private()
347 fd, in mfd_assert_read()
360 fd, in mfd_assert_read()
379 fd, in mfd_assert_read_shared()
397 fd, in mfd_assert_fork_private_write()
446 fd, in mfd_assert_write()
460 fd, in mfd_assert_write()
475 fd, in mfd_assert_write()
520 fd, in mfd_fail_write()
[all …]
/linux/drivers/clk/
A Dclk-fractional-divider.c77 if (fd->lock) in clk_fd_get_div()
84 if (fd->lock) in clk_fd_get_div()
89 mmask = GENMASK(fd->mwidth - 1, 0) << fd->mshift; in clk_fd_get_div()
90 nmask = GENMASK(fd->nwidth - 1, 0) << fd->nshift; in clk_fd_get_div()
198 mmask = GENMASK(fd->mwidth - 1, 0) << fd->mshift; in clk_fd_set_rate()
199 nmask = GENMASK(fd->nwidth - 1, 0) << fd->nshift; in clk_fd_set_rate()
208 val |= (m << fd->mshift) | (n << fd->nshift); in clk_fd_set_rate()
271 fd = kzalloc(sizeof(*fd), GFP_KERNEL); in clk_hw_register_fractional_divider()
272 if (!fd) in clk_hw_register_fractional_divider()
293 kfree(fd); in clk_hw_register_fractional_divider()
[all …]
A Dclk-fractional-divider_test.c21 fd = kunit_kzalloc(test, sizeof(*fd), GFP_KERNEL); in clk_fd_test_approximation_max_denominator()
24 fd->mwidth = 3; in clk_fd_test_approximation_max_denominator()
25 fd->nwidth = 3; in clk_fd_test_approximation_max_denominator()
50 fd = kunit_kzalloc(test, sizeof(*fd), GFP_KERNEL); in clk_fd_test_approximation_max_numerator()
53 fd->mwidth = 3; in clk_fd_test_approximation_max_numerator()
55 fd->nwidth = 3; in clk_fd_test_approximation_max_numerator()
79 fd = kunit_kzalloc(test, sizeof(*fd), GFP_KERNEL); in clk_fd_test_approximation_max_denominator_zero_based()
83 fd->mwidth = 3; in clk_fd_test_approximation_max_denominator_zero_based()
84 fd->nwidth = 3; in clk_fd_test_approximation_max_denominator_zero_based()
109 fd = kunit_kzalloc(test, sizeof(*fd), GFP_KERNEL); in clk_fd_test_approximation_max_numerator_zero_based()
[all …]
/linux/tools/testing/selftests/filesystems/eventfd/
A Deventfd_test.c56 close(fd); in TEST()
70 close(fd); in TEST()
85 close(fd); in TEST()
104 close(fd); in TEST()
185 close(fd); in TEST()
197 int fd; in TEST() local
214 close(fd); in TEST()
225 int fd; in TEST() local
238 close(fd); in TEST()
253 int fd; in TEST() local
[all …]
/linux/fs/hfsplus/
A Dbfind.c19 fd->tree = tree; in hfs_find_init()
20 fd->bnode = NULL; in hfs_find_init()
24 fd->search_key = ptr; in hfs_find_init()
40 fd->tree = NULL; in hfs_find_exit()
89 cmpval = bnode->tree->keycmp(fd->key, fd->search_key); in hfs_find_rec_by_key()
141 fd->record = e; in __hfs_brec_find()
161 tree = fd->tree; in hfs_brec_find()
162 if (fd->bnode) in hfs_brec_find()
164 fd->bnode = NULL; in hfs_brec_find()
216 hfs_bnode_read(fd->bnode, rec, fd->entryoffset, fd->entrylength); in hfs_brec_read()
[all …]
/linux/tools/testing/vsock/
A Dvsock_test.c44 int fd; in test_stream_connection_reset() local
80 int fd; in test_stream_bind_only_client() local
121 int fd; in test_stream_bind_only_server() local
141 int fd; in test_stream_client_close_client() local
155 int fd; in test_stream_client_close_server() local
176 int fd; in test_stream_server_close_client() local
197 int fd; in test_stream_server_close_server() local
268 int fd; in test_msg_peek_client() local
297 int fd; in test_msg_peek_server() local
859 fds.fd = fd; in test_stream_poll_rcvlowat_client()
[all …]
/linux/include/linux/
A Dfile.h44 struct fd { struct
56 #define EMPTY_FD (struct fd){0}
66 static inline void fdput(struct fd fd) in fdput() argument
68 if (fd.word & FDPUT_FPUT) in fdput()
69 fput(fd_file(fd)); in fdput()
77 struct fd fdget(unsigned int fd);
78 struct fd fdget_raw(unsigned int fd);
79 struct fd fdget_pos(unsigned int fd);
88 DEFINE_CLASS(fd, struct fd, fdput(_T), fdget(fd), int fd)
89 DEFINE_CLASS(fd_raw, struct fd, fdput(_T), fdget_raw(fd), int fd)
[all …]
/linux/fs/hfs/
A Dbfind.c19 fd->tree = tree; in hfs_find_init()
20 fd->bnode = NULL; in hfs_find_init()
24 fd->search_key = ptr; in hfs_find_init()
51 fd->tree = NULL; in hfs_find_exit()
75 cmpval = bnode->tree->keycmp(fd->key, fd->search_key); in __hfs_brec_find()
96 fd->record = e; in __hfs_brec_find()
115 tree = fd->tree; in hfs_brec_find()
116 if (fd->bnode) in hfs_brec_find()
118 fd->bnode = NULL; in hfs_brec_find()
170 hfs_bnode_read(fd->bnode, rec, fd->entryoffset, fd->entrylength); in hfs_brec_read()
[all …]
/linux/tools/perf/tests/
A Dwp.c61 int fd; in __event() local
72 return fd; in __event()
82 int fd; in test__wp_ro()
86 if (fd < 0) in test__wp_ro()
95 close(fd); in test__wp_ro()
106 int fd; in test__wp_wo()
110 if (fd < 0) in test__wp_wo()
119 close(fd); in test__wp_wo()
130 int fd; in test__wp_rw()
144 close(fd); in test__wp_rw()
[all …]
/linux/scripts/ipe/polgen/
A Dpolgen.c24 FILE *fd; in policy_to_buffer() local
27 if (!fd) { in policy_to_buffer()
34 rewind(fd); in policy_to_buffer()
50 fclose(fd); in policy_to_buffer()
57 fclose(fd); in policy_to_buffer()
65 FILE *fd; in write_boot_policy() local
69 if (!fd) { in write_boot_policy()
82 fclose(fd); in write_boot_policy()
113 fclose(fd); in write_boot_policy()
118 if (fd) in write_boot_policy()
[all …]
/linux/drivers/scsi/
A Dfdomain.c127 if (fd->chip == tmc18c50 || fd->chip == tmc18c30) in fdomain_make_bus_idle()
214 scsi_done(fd->cur_cmd); in fdomain_finish_cmd()
215 fd->cur_cmd = NULL; in fdomain_finish_cmd()
420 fd->cur_cmd = cmd; in fdomain_queue()
444 if (!fd->cur_cmd) in fdomain_abort()
454 fdomain_finish_cmd(fd); in fdomain_abort()
518 struct fdomain *fd; in fdomain_create() local
550 fd = shost_priv(sh); in fdomain_create()
551 fd->base = base; in fdomain_create()
552 fd->chip = chip; in fdomain_create()
[all …]
/linux/tools/testing/selftests/wireguard/qemu/
A Dinit.c67 if (fd < 0) in seed_rng()
71 close(fd); in seed_rng()
112 int fd; in enable_logging() local
118 close(fd); in enable_logging()
124 close(fd); in enable_logging()
200 close(fd); in launch_tests()
236 int fd; in clear_leaks() local
243 close(fd); in clear_leaks()
248 int fd; in check_leaks() local
256 close(fd); in check_leaks()
[all …]
/linux/fs/
A Dfile.c80 memcpy(nfdt->fd, ofdt->fd, cpy); in copy_fdtable()
500 fd = find_next_fd(fdt, fd); in alloc_fd()
602 BUG_ON(fdt->fd[fd] != NULL); in fd_install()
610 BUG_ON(fdt->fd[fd] != NULL); in fd_install()
639 file = fdt->fd[fd]; in file_close_fd_locked()
699 for (; fd <= max_fd; fd++) { in __range_close()
817 file = fdt->fd[fd]; in do_close_on_exec()
1126 struct fd fdget(unsigned int fd) in fdget() argument
1132 struct fd fdget_raw(unsigned int fd) in fdget_raw() argument
1155 struct fd f = fdget(fd); in fdget_pos()
[all …]
/linux/tools/testing/selftests/bpf/
A Dtest_maps.c40 int fd; in test_hashmap() local
43 if (fd < 0) { in test_hashmap()
130 close(fd); in test_hashmap()
158 int fd, i; in test_hashmap_percpu() local
264 close(fd); in test_hashmap_percpu()
287 return fd; in helper_fill_hashmap()
325 close(fd); in test_hashmap_walk()
513 int fd; in test_devmap() local
527 int fd; in test_devmap_hash() local
1234 fd = -1; in test_map_in_map()
[all …]
/linux/tools/testing/selftests/net/
A Dipv6_flowlabel_mgr.c74 static void run_tests(int fd) in run_tests() argument
83 expect_fail(flowlabel_put(fd, 1)); in run_tests()
99 expect_pass(flowlabel_put(fd, 1)); in run_tests()
100 expect_pass(flowlabel_put(fd, 1)); in run_tests()
101 expect_pass(flowlabel_put(fd, 1)); in run_tests()
102 expect_fail(flowlabel_put(fd, 1)); in run_tests()
110 expect_pass(flowlabel_put(fd, 2)); in run_tests()
185 int fd; in main() local
190 if (fd == -1) in main()
193 run_tests(fd); in main()
[all …]
A Dreuseaddr_ports_exhausted.c58 int fd, ret; in bind_port() local
74 close(fd); in bind_port()
78 return fd; in bind_port()
84 int i, j, fd[2]; in TEST() local
96 if (fd[j] != -1) in TEST()
97 close(fd[j]); in TEST()
104 int i, j, fd[2]; in TEST() local
121 if (fd[j] != -1) in TEST()
122 close(fd[j]); in TEST()
157 if (fd[j] != -1) in TEST()
[all …]
/linux/tools/testing/selftests/iommu/
A Diommufd_fail_nth.c31 int fd; in writeat() local
34 if (fd == -1) in writeat()
38 close(fd); in writeat()
207 int fd; in FIXTURE() local
213 self->fd = -1; in FIXTURE_SETUP()
239 if (self->fd == -1) in TEST_FAIL_NTH()
307 if (self->fd == -1) in TEST_FAIL_NTH()
344 if (self->fd == -1) in TEST_FAIL_NTH()
389 if (self->fd == -1) in TEST_FAIL_NTH()
468 if (self->fd == -1) in TEST_FAIL_NTH()
[all …]
/linux/fs/jffs2/
A Dbuild.c61 for(fd = ic->scan_dents; fd; fd = fd->next) { in jffs2_build_inode_pass1()
63 if (!fd->ino) in jffs2_build_inode_pass1()
71 fd->name, fd->ino, ic->ino); in jffs2_build_inode_pass1()
74 fd->ic = NULL; in jffs2_build_inode_pass1()
79 fd->ic = child_ic; in jffs2_build_inode_pass1()
150 fd = dead_fds; in jffs2_build_filesystem()
187 if (!fd->ic) { in jffs2_build_filesystem()
202 fd->name, fd->ino, ic->ino, fd->ic->pino_nlink); in jffs2_build_filesystem()
283 fd->name, fd->ino); in jffs2_build_remove_unlinked_inode()
294 fd->ino, fd->name); in jffs2_build_remove_unlinked_inode()
[all …]
/linux/arch/um/os-Linux/
A Dfile.c204 if (fd < 0) in os_open_file()
209 close(fd); in os_open_file()
213 return fd; in os_open_file()
219 int fd, err; in os_connect_socket() local
236 return fd; in os_connect_socket()
239 close(fd); in os_connect_socket()
256 close(fd); in os_close_file()
334 int fd; in os_file_size() local
352 close(fd); in os_file_size()
659 if (fd < 0) in os_eventfd()
[all …]
/linux/tools/testing/selftests/mm/
A Dgup_longterm.c246 int fd; in run_with_memfd() local
251 if (fd < 0) { in run_with_memfd()
257 close(fd); in run_with_memfd()
263 int fd; in run_with_tmpfile() local
274 if (fd < 0) { in run_with_tmpfile()
287 int fd; in run_with_local_tmpfile() local
292 if (fd < 0) { in run_with_local_tmpfile()
304 close(fd); in run_with_local_tmpfile()
311 int fd; in run_with_memfd_hugetlb() local
319 if (fd < 0) { in run_with_memfd_hugetlb()
[all …]
/linux/drivers/clk/ti/
A Dfapll.c71 struct fapll_data *fd; member
406 struct fapll_data *fd = synth->fd; in ti_fapll_synth_round_rate() local
440 struct fapll_data *fd = synth->fd; in ti_fapll_synth_set_rate() local
509 synth->fd = fd; in ti_fapll_synth_setup()
541 fd = kzalloc(sizeof(*fd), GFP_KERNEL); in ti_fapll_setup()
542 if (!fd) in ti_fapll_setup()
581 if (!fd->base) { in ti_fapll_setup()
589 fd->name = name; in ti_fapll_setup()
655 iounmap(fd->base); in ti_fapll_setup()
659 if (fd->clk_ref) in ti_fapll_setup()
[all …]
/linux/drivers/infiniband/hw/hfi1/
A Duser_exp_rcv.c71 fd->use_mn = true; in hfi1_user_exp_rcv_init()
94 fd->tid_limit++; in hfi1_user_exp_rcv_init()
278 if (fd->use_mn) { in hfi1_user_exp_rcv_setup()
299 if (fd->tid_used + tidbuf->n_psets > fd->tid_limit) in hfi1_user_exp_rcv_setup()
300 pageset_count = fd->tid_limit - fd->tid_used; in hfi1_user_exp_rcv_setup()
428 if (fd->use_mn) { in hfi1_user_exp_rcv_setup()
451 if (fd->use_mn) in hfi1_user_exp_rcv_setup()
471 if (fd->use_mn) in hfi1_user_exp_rcv_setup()
541 memset(fd->invalid_tids, 0, sizeof(*fd->invalid_tids) * in hfi1_user_exp_rcv_invalid()
752 node->fdata = fd; in set_rcvarray_entry()
[all …]
/linux/tools/testing/selftests/efivarfs/
A Dopen-unlink.c16 int fd; in set_immutable() local
21 if (fd < 0) in set_immutable()
22 return fd; in set_immutable()
27 close(fd); in set_immutable()
39 close(fd); in set_immutable()
47 int fd; in get_immutable() local
52 if (fd < 0) in get_immutable()
53 return fd; in get_immutable()
58 close(fd); in get_immutable()
62 close(fd); in get_immutable()
[all …]
/linux/tools/testing/selftests/kvm/
A Dguest_memfd_test.c23 static void test_file_read_write(int fd) in test_file_read_write() argument
27 TEST_ASSERT(read(fd, buf, sizeof(buf)) < 0, in test_file_read_write()
29 TEST_ASSERT(write(fd, buf, sizeof(buf)) < 0, in test_file_read_write()
50 ret = fstat(fd, &sb); in test_file_size()
128 int fd; in test_create_guest_memfd_invalid() local
132 TEST_ASSERT(fd == -1 && errno == EINVAL, in test_create_guest_memfd_invalid()
139 TEST_ASSERT(fd == -1 && errno == EINVAL, in test_create_guest_memfd_invalid()
177 int fd; in main() local
192 test_file_read_write(fd); in main()
193 test_mmap(fd, page_size); in main()
[all …]
/linux/samples/timers/
A Dhpet_example.c82 int fd; in hpet_open_close() local
90 if (fd < 0) in hpet_open_close()
93 close(fd); in hpet_open_close()
102 int fd; in hpet_info() local
110 if (fd < 0) { in hpet_info()
126 close(fd); in hpet_info()
151 if (fd < 0) { in hpet_poll()
178 pfd.fd = fd; in hpet_poll()
209 close(fd); in hpet_poll()
231 fd = -1; in hpet_fasync()
[all …]

Completed in 57 milliseconds

12345678910>>...58