/linux/tools/testing/selftests/memfd/ |
A D | memfd_test.c | 59 int fd; in mfd_assert_reopen_fd() local 179 fd, in mfd_assert_mmap_shared() 197 fd, in mfd_assert_mmap_private() 252 fd, in mfd_assert_read() 265 fd, in mfd_assert_read() 284 fd, in mfd_assert_read_shared() 302 fd, in mfd_assert_fork_private_write() 351 fd, in mfd_assert_write() 365 fd, in mfd_assert_write() 380 fd, in mfd_assert_write() [all …]
|
/linux/drivers/clk/ |
A D | clk-fractional-divider.c | 75 if (fd->lock) in clk_fd_recalc_rate() 82 if (fd->lock) in clk_fd_recalc_rate() 87 m = (val & fd->mmask) >> fd->mshift; in clk_fd_recalc_rate() 88 n = (val & fd->nmask) >> fd->nshift; in clk_fd_recalc_rate() 126 GENMASK(fd->mwidth - 1, 0), GENMASK(fd->nwidth - 1, 0), in clk_fractional_divider_general_approximation() 174 val &= ~(fd->mmask | fd->nmask); in clk_fd_set_rate() 175 val |= (m << fd->mshift) | (n << fd->nshift); in clk_fd_set_rate() 203 fd = kzalloc(sizeof(*fd), GFP_KERNEL); in clk_hw_register_fractional_divider() 204 if (!fd) in clk_hw_register_fractional_divider() 227 kfree(fd); in clk_hw_register_fractional_divider() [all …]
|
/linux/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 …]
|
A D | brec.c | 72 tree = fd->tree; in hfs_brec_insert() 73 if (!fd->bnode) { in hfs_brec_insert() 79 fd->bnode = node; in hfs_brec_insert() 80 fd->record = -1; in hfs_brec_insert() 89 node = fd->bnode; in hfs_brec_insert() 160 __hfs_brec_find(fd->bnode, fd, hfs_find_rec_by_key); in hfs_brec_insert() 185 tree = fd->tree; in hfs_brec_remove() 197 fd->record, fd->keylength + fd->entrylength); in hfs_brec_remove() 217 size = fd->keylength + fd->entrylength; in hfs_brec_remove() 226 hfs_bnode_move(node, fd->keyoffset, fd->keyoffset + size, in hfs_brec_remove() [all …]
|
/linux/tools/testing/vsock/ |
A D | vsock_test.c | 37 int fd; in test_stream_connection_reset() local 57 close(fd); in test_stream_connection_reset() 73 int fd; in test_stream_bind_only_client() local 114 int fd; in test_stream_bind_only_server() local 134 int fd; in test_stream_client_close_client() local 148 int fd; in test_stream_client_close_server() local 169 int fd; in test_stream_server_close_client() local 190 int fd; in test_stream_server_close_server() local 257 int fd; in test_stream_msg_peek_client() local 271 int fd; in test_stream_msg_peek_server() local [all …]
|
/linux/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 …]
|
A D | brec.c | 74 tree = fd->tree; in hfs_brec_insert() 75 if (!fd->bnode) { in hfs_brec_insert() 82 fd->record = -1; in hfs_brec_insert() 91 node = fd->bnode; in hfs_brec_insert() 160 __hfs_brec_find(fd->bnode, fd); in hfs_brec_insert() 183 tree = fd->tree; in hfs_brec_remove() 195 fd->record, fd->keylength + fd->entrylength); in hfs_brec_remove() 213 size = fd->keylength + fd->entrylength; in hfs_brec_remove() 222 hfs_bnode_move(node, fd->keyoffset, fd->keyoffset + size, in hfs_brec_remove() 226 if (!fd->record) in hfs_brec_remove() [all …]
|
/linux/tools/testing/selftests/wireguard/qemu/ |
A D | init.c | 59 int fd; in seed_rng() local 73 if (fd < 0) in seed_rng() 79 close(fd); in seed_rng() 111 int fd; in enable_logging() local 117 close(fd); in enable_logging() 123 close(fd); in enable_logging() 129 close(fd); in enable_logging() 241 int fd; in clear_leaks() local 248 close(fd); in clear_leaks() 253 int fd; in check_leaks() local [all …]
|
/linux/drivers/scsi/ |
A D | fdomain.c | 122 if (fd->chip == tmc18c50 || fd->chip == tmc18c30) in fdomain_make_bus_idle() 209 scsi_done(fd->cur_cmd); in fdomain_finish_cmd() 210 fd->cur_cmd = NULL; in fdomain_finish_cmd() 413 fd->cur_cmd = cmd; in fdomain_queue() 437 if (!fd->cur_cmd) in fdomain_abort() 447 fdomain_finish_cmd(fd); in fdomain_abort() 510 struct fdomain *fd; in fdomain_create() local 542 fd = shost_priv(sh); in fdomain_create() 543 fd->base = base; in fdomain_create() 544 fd->chip = chip; in fdomain_create() [all …]
|
/linux/fs/ |
A D | file.c | 84 memcpy(nfdt->fd, ofdt->fd, cpy); in copy_fdtable() 485 fd = find_next_fd(fdt, fd); in alloc_fd() 584 BUG_ON(fdt->fd[fd] != NULL); in fd_install() 592 BUG_ON(fdt->fd[fd] != NULL); in fd_install() 593 rcu_assign_pointer(fdt->fd[fd], file); in fd_install() 620 file = fdt->fd[fd]; in pick_file() 625 rcu_assign_pointer(fdt->fd[fd], NULL); in pick_file() 778 file = fdt->fd[fd]; in __close_fd_get_file() 781 rcu_assign_pointer(fdt->fd[fd], NULL); in __close_fd_get_file() 829 file = fdt->fd[fd]; in do_close_on_exec() [all …]
|
/linux/tools/perf/tests/ |
A D | wp.c | 54 int fd; in __event() local 60 if (fd < 0) in __event() 63 return fd; in __event() 73 int fd; in test__wp_ro() 77 if (fd < 0) in test__wp_ro() 86 close(fd); in test__wp_ro() 97 int fd; in test__wp_wo() 101 if (fd < 0) in test__wp_wo() 110 close(fd); in test__wp_wo() 121 int fd; in test__wp_rw() [all …]
|
/linux/tools/testing/selftests/bpf/ |
A D | test_maps.c | 40 int fd; in test_hashmap() local 44 if (fd < 0) { in test_hashmap() 131 close(fd); in test_hashmap() 160 int fd, i; in test_hashmap_percpu() local 266 close(fd); in test_hashmap_percpu() 288 return fd; in helper_fill_hashmap() 326 close(fd); in test_hashmap_walk() 515 int fd; in test_devmap() local 530 int fd; in test_devmap_hash() local 1236 fd = -1; in test_map_in_map() [all …]
|
/linux/include/linux/ |
A D | file.h | 36 struct fd { struct 43 static inline void fdput(struct fd fd) in fdput() argument 45 if (fd.flags & FDPUT_FPUT) in fdput() 46 fput(fd.file); in fdput() 49 extern struct file *fget(unsigned int fd); 63 static inline struct fd fdget(unsigned int fd) in fdget() argument 65 return __to_fd(__fdget(fd)); in fdget() 68 static inline struct fd fdget_raw(unsigned int fd) in fdget_raw() argument 70 return __to_fd(__fdget_raw(fd)); in fdget_raw() 73 static inline struct fd fdget_pos(int fd) in fdget_pos() argument [all …]
|
/linux/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/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() 632 if (fd < 0) in os_eventfd() [all …]
|
/linux/drivers/clk/ti/ |
A D | fapll.c | 78 struct fapll_data *fd; member 413 struct fapll_data *fd = synth->fd; in ti_fapll_synth_round_rate() local 447 struct fapll_data *fd = synth->fd; in ti_fapll_synth_set_rate() local 516 synth->fd = fd; in ti_fapll_synth_setup() 547 fd = kzalloc(sizeof(*fd), GFP_KERNEL); in ti_fapll_setup() 548 if (!fd) in ti_fapll_setup() 586 if (!fd->base) { in ti_fapll_setup() 595 fd->hw.init = init; in ti_fapll_setup() 661 iounmap(fd->base); in ti_fapll_setup() 665 if (fd->clk_ref) in ti_fapll_setup() [all …]
|
/linux/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 …]
|
/linux/tools/lib/perf/ |
A D | evsel.c | 59 if (fd) in perf_evsel__alloc_fd() 60 *fd = -1; in perf_evsel__alloc_fd() 86 int *fd; in get_group_fd() local 101 if (fd == NULL || *fd == -1) in get_group_fd() 158 if (fd < 0) in perf_evsel__open() 175 if (fd && *fd >= 0) { in perf_evsel__close_fd_cpu() 177 *fd = -1; in perf_evsel__close_fd_cpu() 224 if (fd == NULL || *fd < 0) in perf_evsel__munmap() 254 if (fd == NULL || *fd < 0) in perf_evsel__mmap() 314 if (fd == NULL || *fd < 0) in perf_evsel__read() [all …]
|
/linux/drivers/infiniband/hw/hfi1/ |
A D | user_exp_rcv.c | 52 if (!fd->entry_to_rb) in hfi1_user_exp_rcv_init() 65 fd->use_mn = true; in hfi1_user_exp_rcv_init() 88 fd->tid_limit++; in hfi1_user_exp_rcv_init() 111 kfree(fd->entry_to_rb); in hfi1_user_exp_rcv_free() 289 if (fd->tid_used + tidbuf->n_psets > fd->tid_limit) in hfi1_user_exp_rcv_setup() 290 pageset_count = fd->tid_limit - fd->tid_used; in hfi1_user_exp_rcv_setup() 495 memset(fd->invalid_tids, 0, sizeof(*fd->invalid_tids) * in hfi1_user_exp_rcv_invalid() 708 node->fdata = fd; in set_rcvarray_entry() 717 if (fd->use_mn) { in set_rcvarray_entry() 775 if (fd->use_mn) in unprogram_rcvarray() [all …]
|
/linux/tools/testing/selftests/kvm/x86_64/ |
A D | sev_migrate_tests.c | 102 sev_migrate_from(dst_vms[0]->fd, src_vm->fd); in test_sev_migrate_from() 105 sev_migrate_from(dst_vms[i]->fd, dst_vms[i - 1]->fd); in test_sev_migrate_from() 173 ret = __sev_migrate_from(sev_vm->fd, sev_es_vm->fd); in test_sev_migrate_parameters() 179 ret = __sev_migrate_from(sev_es_vm->fd, sev_vm->fd); in test_sev_migrate_parameters() 239 sev_mirror_create(dst_vm->fd, src_vm->fd); in test_sev_mirror() 262 ret = __sev_mirror_create(sev_vm->fd, sev_vm->fd); in test_sev_mirror_parameters() 307 sev_mirror_create(mirror_vm->fd, sev_vm->fd); in test_sev_move_copy() 308 ret = __sev_migrate_from(dst_vm->fd, sev_vm->fd); in test_sev_move_copy() 314 sev_migrate_from(dst_mirror_vm->fd, mirror_vm->fd); in test_sev_move_copy() 315 ret = __sev_migrate_from(dst_vm->fd, sev_vm->fd); in test_sev_move_copy() [all …]
|
/linux/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/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/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 …]
|
/linux/tools/testing/selftests/rtc/ |
A D | rtctest.c | 27 int fd; in FIXTURE() local 31 self->fd = open(rtc_file, O_RDONLY); in FIXTURE_SETUP() 32 ASSERT_NE(-1, self->fd); in FIXTURE_SETUP() 36 close(self->fd); in FIXTURE_TEARDOWN() 57 rc = ioctl(self->fd, RTC_UIE_ON, 0); 82 rc = ioctl(self->fd, RTC_UIE_ON, 0); in TEST_F() 94 FD_SET(self->fd, &readfds); in TEST_F() 144 FD_SET(self->fd, &readfds); in TEST_F() 198 FD_SET(self->fd, &readfds); in TEST_F() 246 FD_SET(self->fd, &readfds); [all …]
|