/linux-6.3-rc2/tools/testing/selftests/memfd/ |
A D | memfd_test.c | 124 int fd; in mfd_assert_reopen_fd() local 247 fd, in mfd_assert_mmap_shared() 265 fd, in mfd_assert_mmap_private() 320 fd, in mfd_assert_read() 333 fd, in mfd_assert_read() 352 fd, in mfd_assert_read_shared() 370 fd, in mfd_assert_fork_private_write() 419 fd, in mfd_assert_write() 433 fd, in mfd_assert_write() 448 fd, in mfd_assert_write() [all …]
|
/linux-6.3-rc2/drivers/clk/ |
A D | clk-fractional-divider.c | 76 if (fd->lock) in clk_fd_get_div() 83 if (fd->lock) in clk_fd_get_div() 88 m = (val & fd->mmask) >> fd->mshift; in clk_fd_get_div() 89 n = (val & fd->nmask) >> fd->nshift; in clk_fd_get_div() 138 GENMASK(fd->mwidth - 1, 0), GENMASK(fd->nwidth - 1, 0), in clk_fractional_divider_general_approximation() 186 val &= ~(fd->mmask | fd->nmask); in clk_fd_set_rate() 187 val |= (m << fd->mshift) | (n << fd->nshift); in clk_fd_set_rate() 250 fd = kzalloc(sizeof(*fd), GFP_KERNEL); in clk_hw_register_fractional_divider() 251 if (!fd) in clk_hw_register_fractional_divider() 274 kfree(fd); in clk_hw_register_fractional_divider() [all …]
|
/linux-6.3-rc2/tools/perf/tests/ |
A D | wp.c | 56 int fd; in __event() local 67 return fd; in __event() 77 int fd; in test__wp_ro() 81 if (fd < 0) in test__wp_ro() 90 close(fd); in test__wp_ro() 101 int fd; in test__wp_wo() 105 if (fd < 0) in test__wp_wo() 114 close(fd); in test__wp_wo() 125 int fd; in test__wp_rw() 139 close(fd); in test__wp_rw() [all …]
|
/linux-6.3-rc2/fs/hfsplus/ |
A D | bfind.c | 19 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() 100 cmpval = bnode->tree->keycmp(fd->key, fd->search_key); in hfs_find_rec_by_key() 152 fd->record = e; in __hfs_brec_find() 172 tree = fd->tree; in hfs_brec_find() 173 if (fd->bnode) in hfs_brec_find() 175 fd->bnode = NULL; in hfs_brec_find() 227 hfs_bnode_read(fd->bnode, rec, fd->entryoffset, fd->entrylength); in hfs_brec_read() [all …]
|
/linux-6.3-rc2/fs/hfs/ |
A D | bfind.c | 19 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-6.3-rc2/tools/testing/vsock/ |
A D | vsock_test.c | 40 int fd; in test_stream_connection_reset() local 76 int fd; in test_stream_bind_only_client() local 117 int fd; in test_stream_bind_only_server() local 137 int fd; in test_stream_client_close_client() local 151 int fd; in test_stream_client_close_server() local 172 int fd; in test_stream_server_close_client() local 193 int fd; in test_stream_server_close_server() local 260 int fd; in test_stream_msg_peek_client() local 274 int fd; in test_stream_msg_peek_server() local 295 int fd; in test_seqpacket_msg_bounds_client() local [all …]
|
/linux-6.3-rc2/drivers/scsi/ |
A D | fdomain.c | 127 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-6.3-rc2/tools/testing/selftests/wireguard/qemu/ |
A D | init.c | 67 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-6.3-rc2/fs/ |
A D | file.c | 84 memcpy(nfdt->fd, ofdt->fd, cpy); in copy_fdtable() 514 fd = find_next_fd(fdt, fd); in alloc_fd() 548 rcu_assign_pointer(fdt->fd[fd], NULL); in alloc_fd() 613 BUG_ON(fdt->fd[fd] != NULL); in fd_install() 614 rcu_assign_pointer(fdt->fd[fd], file); in fd_install() 621 BUG_ON(fdt->fd[fd] != NULL); in fd_install() 622 rcu_assign_pointer(fdt->fd[fd], file); in fd_install() 646 file = fdt->fd[fd]; in pick_file() 648 rcu_assign_pointer(fdt->fd[fd], NULL); in pick_file() 839 file = fdt->fd[fd]; in do_close_on_exec() [all …]
|
/linux-6.3-rc2/include/linux/ |
A D | file.h | 35 struct fd { struct 42 static inline void fdput(struct fd fd) in fdput() argument 44 if (fd.flags & FDPUT_FPUT) in fdput() 45 fput(fd.file); in fdput() 48 extern struct file *fget(unsigned int fd); 61 static inline struct fd fdget(unsigned int fd) in fdget() argument 63 return __to_fd(__fdget(fd)); in fdget() 66 static inline struct fd fdget_raw(unsigned int fd) in fdget_raw() argument 68 return __to_fd(__fdget_raw(fd)); in fdget_raw() 71 static inline struct fd fdget_pos(int fd) in fdget_pos() argument [all …]
|
A D | fdtable.h | 29 struct file __rcu **fd; /* current fd array */ member 38 return test_bit(fd, fdt->close_on_exec); in close_on_exec() 43 return test_bit(fd, fdt->open_fds); in fd_is_open() 87 if (fd < fdt->max_fds) { in files_lookup_fd_raw() 88 fd = array_index_nospec(fd, fdt->max_fds); in files_lookup_fd_raw() 89 return rcu_dereference_raw(fdt->fd[fd]); in files_lookup_fd_raw() 98 return files_lookup_fd_raw(files, fd); in files_lookup_fd_locked() 105 return files_lookup_fd_raw(files, fd); in files_lookup_fd_rcu() 110 return files_lookup_fd_rcu(current->files, fd); in lookup_fd_rcu() 126 extern int close_fd(unsigned int fd); [all …]
|
/linux-6.3-rc2/tools/testing/selftests/bpf/ |
A D | test_maps.c | 40 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 1230 fd = -1; in test_map_in_map() [all …]
|
/linux-6.3-rc2/tools/testing/selftests/net/ |
A D | ipv6_flowlabel_mgr.c | 74 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 D | reuseaddr_ports_exhausted.c | 58 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 …]
|
A D | ip_local_port_range.c | 172 int fd, err; in TEST_F() local 195 err = close(fd); in TEST_F() 239 fds[i] = fd; in TEST_F() 283 err = close(fd); in TEST_F() 291 int i, fd, err; in TEST_F() local 312 fds[i] = fd; in TEST_F() 330 err = close(fd); in TEST_F() 348 int fd, err; in TEST_F() local 397 err = close(fd); in TEST_F() 405 int fd, err; in TEST_F() local [all …]
|
/linux-6.3-rc2/fs/jffs2/ |
A D | build.c | 61 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() 280 fd->name, fd->ino); in jffs2_build_remove_unlinked_inode() 291 fd->ino, fd->name); in jffs2_build_remove_unlinked_inode() [all …]
|
/linux-6.3-rc2/arch/um/os-Linux/ |
A D | file.c | 203 if (fd < 0) in os_open_file() 208 close(fd); in os_open_file() 212 return fd; in os_open_file() 218 int fd, err; in os_connect_socket() local 235 return fd; in os_connect_socket() 238 close(fd); in os_connect_socket() 245 close(fd); in os_close_file() 323 int fd; in os_file_size() local 341 close(fd); in os_file_size() 641 if (fd < 0) in os_eventfd() [all …]
|
/linux-6.3-rc2/tools/testing/selftests/iommu/ |
A D | iommufd_fail_nth.c | 31 int fd; in writeat() local 34 if (fd == -1) in writeat() 38 close(fd); in writeat() 205 int fd; in FIXTURE() local 211 self->fd = -1; in FIXTURE_SETUP() 237 if (self->fd == -1) in TEST_FAIL_NTH() 305 if (self->fd == -1) in TEST_FAIL_NTH() 344 if (self->fd == -1) in TEST_FAIL_NTH() 391 if (self->fd == -1) in TEST_FAIL_NTH() 470 if (self->fd == -1) in TEST_FAIL_NTH() [all …]
|
A D | iommufd_utils.h | 52 ret = ioctl(fd, IOMMU_TEST_CMD, &cmd); in _test_cmd_mock_domain() 80 ret = ioctl(fd, IOMMU_TEST_CMD, &cmd); in _test_cmd_create_access() 106 return ioctl(fd, IOMMU_TEST_CMD, &cmd); in _test_cmd_destroy_access_pages() 121 return ioctl(fd, IOMMU_DESTROY, &cmd); in _test_ioctl_destroy() 132 ret = ioctl(fd, IOMMU_IOAS_ALLOC, &cmd); in _test_ioctl_ioas_alloc() 159 ret = ioctl(fd, IOMMU_IOAS_MAP, &cmd); in _test_ioctl_ioas_map() 260 if (fd == -1) in teardown_iommufd() 263 EXPECT_EQ(0, close(fd)); in teardown_iommufd() 265 fd = open("/dev/iommu", O_RDWR); in teardown_iommufd() 266 EXPECT_NE(-1, fd); in teardown_iommufd() [all …]
|
/linux-6.3-rc2/drivers/clk/ti/ |
A D | fapll.c | 71 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-6.3-rc2/drivers/infiniband/hw/hfi1/ |
A D | user_exp_rcv.c | 71 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-6.3-rc2/tools/testing/selftests/efivarfs/ |
A D | open-unlink.c | 16 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-6.3-rc2/samples/timers/ |
A D | hpet_example.c | 82 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 …]
|
/linux-6.3-rc2/tools/testing/selftests/rtc/ |
A D | rtctest.c | 29 int fd; in FIXTURE() local 37 close(self->fd); in FIXTURE_TEARDOWN() 46 ASSERT_NE(-1, self->fd); in TEST_F() 93 ASSERT_NE(-1, self->fd); 131 ASSERT_NE(-1, self->fd); 160 ASSERT_NE(-1, self->fd); in TEST_F() 203 ASSERT_NE(-1, self->fd); in TEST_F() 229 FD_SET(self->fd, &readfds); in TEST_F() 261 ASSERT_NE(-1, self->fd); in TEST_F() 313 ASSERT_NE(-1, self->fd); [all …]
|
/linux-6.3-rc2/arch/um/drivers/ |
A D | port_kern.c | 24 int fd; member 38 int fd; member 48 int fd; in pipe_interrupt() local 51 if (fd < 0) { in pipe_interrupt() 62 conn->fd = fd; in pipe_interrupt() 81 fd = port_connection(port->fd, socket, &pid); in port_accept() 97 .fd = fd, in port_accept() 163 int fd; in port_data() local 195 .fd = fd, in port_data() 228 int fd; in port_wait() local [all …]
|