| /linux-6.15/tools/testing/selftests/memfd/ |
| H A D | memfd_test.c | 275 fd, in mfd_assert_mmap_shared() 293 fd, in mfd_assert_mmap_read_shared() 311 fd, in mfd_assert_mmap_private() 366 fd, in mfd_assert_read() 379 fd, in mfd_assert_read() 398 fd, in mfd_assert_read_shared() 416 fd, in mfd_assert_fork_private_write() 465 fd, in mfd_assert_write() 479 fd, in mfd_assert_write() 494 fd, in mfd_assert_write() [all …]
|
| /linux-6.15/tools/testing/vsock/ |
| H A D | vsock_test.c | 49 int fd; in test_stream_connection_reset() local 85 int fd; in test_stream_bind_only_client() local 116 int fd; in test_stream_bind_only_server() local 131 int fd; in test_stream_client_close_client() local 145 int fd; in test_stream_client_close_server() local 166 int fd; in test_stream_server_close_client() local 187 int fd; in test_stream_server_close_server() local 258 int fd; in test_msg_peek_client() local 848 fds.fd = fd; in test_stream_poll_rcvlowat_client() 1429 fds.fd = fd; in test_stream_credit_update_test() [all …]
|
| /linux-6.15/drivers/clk/ |
| H A D | clk-fractional-divider.c | 77 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 …]
|
| H A D | clk-fractional-divider_test.c | 21 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-6.15/include/linux/ |
| H A D | file.h | 38 struct fd { struct 60 static inline void fdput(struct fd fd) in fdput() argument 62 if (fd.word & FDPUT_FPUT) in fdput() 63 fput(fd_file(fd)); in fdput() 72 struct fd fdget(unsigned int fd); 73 struct fd fdget_raw(unsigned int fd); 74 struct fd fdget_pos(unsigned int fd); 83 DEFINE_CLASS(fd, struct fd, fdput(_T), fdget(fd), int fd) 84 DEFINE_CLASS(fd_raw, struct fd, fdput(_T), fdget_raw(fd), int fd) 85 DEFINE_CLASS(fd_pos, struct fd, fdput_pos(_T), fdget_pos(fd), int fd) [all …]
|
| /linux-6.15/tools/testing/selftests/filesystems/eventfd/ |
| H A D | eventfd_test.c | 56 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-6.15/fs/hfsplus/ |
| H 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() 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-6.15/fs/hfs/ |
| H 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.15/tools/perf/tests/ |
| H A D | wp.c | 61 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-6.15/drivers/scsi/ |
| H 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.15/tools/testing/selftests/wireguard/qemu/ |
| H 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.15/scripts/ipe/polgen/ |
| H A D | polgen.c | 24 FILE *fd; in policy_to_buffer() local 27 if (!fd) { in policy_to_buffer() 33 fsize = ftell(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() 64 FILE *fd; in write_boot_policy() local 68 if (!fd) in write_boot_policy() 79 fclose(fd); in write_boot_policy() 91 fprintf(fd, "'"); in write_boot_policy() [all …]
|
| /linux-6.15/tools/testing/selftests/iommu/ |
| H A D | iommufd_fail_nth.c | 31 int fd; in writeat() local 34 if (fd == -1) in writeat() 38 close(fd); in writeat() 210 int fd; in FIXTURE() local 218 self->fd = -1; in FIXTURE_SETUP() 248 if (self->fd == -1) in TEST_FAIL_NTH() 316 if (self->fd == -1) in TEST_FAIL_NTH() 352 if (self->fd == -1) in TEST_FAIL_NTH() 389 if (self->fd == -1) in TEST_FAIL_NTH() 434 if (self->fd == -1) in TEST_FAIL_NTH() [all …]
|
| /linux-6.15/tools/testing/selftests/bpf/ |
| H A D | test_maps.c | 36 int fd; in test_hashmap() local 39 if (fd < 0) { in test_hashmap() 126 close(fd); in test_hashmap() 154 int fd, i; in test_hashmap_percpu() local 260 close(fd); in test_hashmap_percpu() 283 return fd; in helper_fill_hashmap() 321 close(fd); in test_hashmap_walk() 509 int fd; in test_devmap() local 523 int fd; in test_devmap_hash() local 1230 fd = -1; in test_map_in_map() [all …]
|
| /linux-6.15/tools/testing/selftests/net/ |
| H 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 …]
|
| H 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-6.15/fs/ |
| H A D | file.c | 149 memcpy(nfdt->fd, ofdt->fd, cpy); in copy_fdtable() 570 fd = find_next_fd(fdt, fd); in alloc_fd() 652 rcu_assign_pointer(fdt->fd[fd], file); in fd_install() 660 rcu_assign_pointer(fdt->fd[fd], file); in fd_install() 690 rcu_assign_pointer(fdt->fd[fd], NULL); in file_close_fd_locked() 748 for (; fd <= max_fd; fd++) { in __range_close() 868 file = fdt->fd[fd]; in do_close_on_exec() 1164 struct fd fdget(unsigned int fd) in fdget() argument 1170 struct fd fdget_raw(unsigned int fd) in fdget_raw() argument 1206 struct fd fdget_pos(unsigned int fd) in fdget_pos() argument [all …]
|
| /linux-6.15/arch/um/os-Linux/ |
| H A D | file.c | 204 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() 328 int fd; in os_file_size() local 346 close(fd); in os_file_size() 653 if (fd < 0) in os_eventfd() [all …]
|
| /linux-6.15/fs/jffs2/ |
| H 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() 283 fd->name, fd->ino); in jffs2_build_remove_unlinked_inode() 294 fd->ino, fd->name); in jffs2_build_remove_unlinked_inode() [all …]
|
| /linux-6.15/drivers/clk/ti/ |
| H 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.15/drivers/infiniband/hw/hfi1/ |
| H 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.15/tools/testing/selftests/mm/ |
| H A D | gup_longterm.c | 255 int fd; in run_with_memfd() local 260 if (fd < 0) { in run_with_memfd() 266 close(fd); in run_with_memfd() 272 int fd; in run_with_tmpfile() local 283 if (fd < 0) { in run_with_tmpfile() 296 int fd; in run_with_local_tmpfile() local 301 if (fd < 0) { in run_with_local_tmpfile() 313 close(fd); in run_with_local_tmpfile() 320 int fd; in run_with_memfd_hugetlb() local 328 if (fd < 0) { in run_with_memfd_hugetlb() [all …]
|
| /linux-6.15/tools/testing/selftests/efivarfs/ |
| H 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.15/tools/testing/selftests/kvm/ |
| H A D | guest_memfd_test.c | 23 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-6.15/tools/testing/selftests/rtc/ |
| H A D | rtctest.c | 36 int fd; in FIXTURE() local 44 close(self->fd); in FIXTURE_TEARDOWN() 53 ASSERT_NE(-1, self->fd); in TEST_F() 122 ASSERT_NE(-1, self->fd); 160 ASSERT_NE(-1, self->fd); 189 ASSERT_NE(-1, self->fd); in TEST_F() 233 ASSERT_NE(-1, self->fd); in TEST_F() 270 FD_SET(self->fd, &readfds); in TEST_F() 303 ASSERT_NE(-1, self->fd); in TEST_F() 367 ASSERT_NE(-1, self->fd); [all …]
|