/linux/drivers/misc/vmw_vmci/ ! |
H A D | vmci_handle_array.c | 13 struct vmci_handle_arr *array; in vmci_handle_arr_create() local 22 array = kmalloc(struct_size(array, entries, capacity), GFP_ATOMIC); in vmci_handle_arr_create() 23 if (!array) in vmci_handle_arr_create() 26 array->capacity = capacity; in vmci_handle_arr_create() 27 array->max_capacity = max_capacity; in vmci_handle_arr_create() 28 array->size = 0; in vmci_handle_arr_create() 30 return array; in vmci_handle_arr_create() 33 void vmci_handle_arr_destroy(struct vmci_handle_arr *array) in vmci_handle_arr_destroy() argument 35 kfree(array); in vmci_handle_arr_destroy() 41 struct vmci_handle_arr *array = *array_ptr; in vmci_handle_arr_append_entry() local [all …]
|
H A D | vmci_handle_array.h | 27 void vmci_handle_arr_destroy(struct vmci_handle_arr *array); 30 struct vmci_handle vmci_handle_arr_remove_entry(struct vmci_handle_arr *array, 33 struct vmci_handle vmci_handle_arr_remove_tail(struct vmci_handle_arr *array); 35 vmci_handle_arr_get_entry(const struct vmci_handle_arr *array, u32 index); 36 bool vmci_handle_arr_has_entry(const struct vmci_handle_arr *array, 38 struct vmci_handle *vmci_handle_arr_get_handles(struct vmci_handle_arr *array); 41 const struct vmci_handle_arr *array) in vmci_handle_arr_get_size() argument 43 return array->size; in vmci_handle_arr_get_size()
|
/linux/fs/xfs/scrub/ ! |
H A D | xfarray.c | 36 static inline void *xfarray_scratch(struct xfarray *array) in xfarray_scratch() argument 38 return (array + 1); in xfarray_scratch() 44 struct xfarray *array, in xfarray_idx() argument 47 if (array->obj_size_log >= 0) in xfarray_idx() 48 return (xfarray_idx_t)pos >> array->obj_size_log; in xfarray_idx() 50 return div_u64((xfarray_idx_t)pos, array->obj_size); in xfarray_idx() 54 static inline loff_t xfarray_pos(struct xfarray *array, xfarray_idx_t idx) in xfarray_pos() argument 56 if (array->obj_size_log >= 0) in xfarray_pos() 57 return idx << array->obj_size_log; in xfarray_pos() 59 return idx * array->obj_size; in xfarray_pos() [all …]
|
H A D | xfarray.h | 15 #define foreach_xfarray_idx(array, idx) \ argument 17 (idx) < xfarray_length(array); \ 42 void xfarray_destroy(struct xfarray *array); 43 int xfarray_load(struct xfarray *array, xfarray_idx_t idx, void *ptr); 44 int xfarray_unset(struct xfarray *array, xfarray_idx_t idx); 45 int xfarray_store(struct xfarray *array, xfarray_idx_t idx, const void *ptr); 46 int xfarray_store_anywhere(struct xfarray *array, const void *ptr); 47 bool xfarray_element_is_null(struct xfarray *array, const void *ptr); 48 void xfarray_truncate(struct xfarray *array); 49 unsigned long long xfarray_bytes(struct xfarray *array); [all …]
|
/linux/sound/hda/core/ ! |
H A D | array.c | 19 void *snd_array_new(struct snd_array *array) in snd_array_new() argument 21 if (snd_BUG_ON(!array->elem_size)) in snd_array_new() 23 if (array->used >= array->alloced) { in snd_array_new() 24 int num = array->alloced + array->alloc_align; in snd_array_new() 25 int oldsize = array->alloced * array->elem_size; in snd_array_new() 26 int size = (num + 1) * array->elem_size; in snd_array_new() 30 nlist = krealloc(array->list, size, GFP_KERNEL); in snd_array_new() 34 array->list = nlist; in snd_array_new() 35 array->alloced = num; in snd_array_new() 37 return snd_array_elem(array, array->used++); in snd_array_new() [all …]
|
/linux/kernel/bpf/ ! |
H A D | arraymap.c | 22 static void bpf_array_free_percpu(struct bpf_array *array) in bpf_array_free_percpu() argument 26 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_free_percpu() 27 free_percpu(array->pptrs[i]); in bpf_array_free_percpu() 32 static int bpf_array_alloc_percpu(struct bpf_array *array) in bpf_array_alloc_percpu() argument 37 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_alloc_percpu() 38 ptr = bpf_map_alloc_percpu(&array->map, array->elem_size, 8, in bpf_array_alloc_percpu() 41 bpf_array_free_percpu(array); in bpf_array_alloc_percpu() 44 array->pptrs[i] = ptr; in bpf_array_alloc_percpu() 90 struct bpf_array *array; in array_map_alloc() local 115 array_size = sizeof(*array); in array_map_alloc() [all …]
|
/linux/drivers/infiniband/hw/mthca/ ! |
H A D | mthca_allocator.c | 113 void *mthca_array_get(struct mthca_array *array, int index) in mthca_array_get() argument 117 if (array->page_list[p].page) in mthca_array_get() 118 return array->page_list[p].page[index & MTHCA_ARRAY_MASK]; in mthca_array_get() 123 int mthca_array_set(struct mthca_array *array, int index, void *value) in mthca_array_set() argument 128 if (!array->page_list[p].page) in mthca_array_set() 129 array->page_list[p].page = (void **) get_zeroed_page(GFP_ATOMIC); in mthca_array_set() 131 if (!array->page_list[p].page) in mthca_array_set() 134 array->page_list[p].page[index & MTHCA_ARRAY_MASK] = value; in mthca_array_set() 135 ++array->page_list[p].used; in mthca_array_set() 140 void mthca_array_clear(struct mthca_array *array, int index) in mthca_array_clear() argument [all …]
|
/linux/include/linux/ ! |
H A D | assoc_array.h | 54 static inline void assoc_array_init(struct assoc_array *array) in assoc_array_init() argument 56 array->root = NULL; in assoc_array_init() 57 array->nr_leaves_on_tree = 0; in assoc_array_init() 60 extern int assoc_array_iterate(const struct assoc_array *array, 64 extern void *assoc_array_find(const struct assoc_array *array, 67 extern void assoc_array_destroy(struct assoc_array *array, 69 extern struct assoc_array_edit *assoc_array_insert(struct assoc_array *array, 75 extern struct assoc_array_edit *assoc_array_delete(struct assoc_array *array, 78 extern struct assoc_array_edit *assoc_array_clear(struct assoc_array *array, 82 extern int assoc_array_gc(struct assoc_array *array,
|
/linux/scripts/coccinelle/misc/ ! |
H A D | flexible_array.cocci | 5 /// Flexible-array members should be used instead. 27 identifier name, array; 35 * T array@p[\(0\|1\)]; 40 * T array@p[\(0\|1\)]; 45 * T array@p[\(0\|1\)]; 50 * T array@p[\(0\|1\)]; 55 identifier name, array; 62 T array[0]; 66 T array[0]; 71 identifier name, array; [all …]
|
/linux/arch/s390/tools/ ! |
H A D | gen_facilities.c | 129 unsigned long long *array; in print_facility_list() local 131 array = calloc(1, 8); in print_facility_list() 132 if (!array) in print_facility_list() 139 array = realloc(array, (dword + 1) * 8); in print_facility_list() 140 if (!array) in print_facility_list() 142 memset(array + high + 1, 0, (dword - high) * 8); in print_facility_list() 145 array[dword] |= 1ULL << bit; in print_facility_list() 149 printf("_AC(0x%016llx,UL)%c", array[i], i < high ? ',' : '\n'); in print_facility_list() 150 free(array); in print_facility_list()
|
/linux/drivers/scsi/isci/ ! |
H A D | unsolicited_frame_control.c | 85 uf_control->headers.array = virt + SCI_UFI_BUF_SIZE; in sci_unsolicited_frame_control_construct() 95 uf_control->address_table.array = virt + SCI_UFI_BUF_SIZE + SCI_UFI_HDR_SIZE; in sci_unsolicited_frame_control_construct() 110 uf = &uf_control->buffers.array[i]; in sci_unsolicited_frame_control_construct() 112 uf_control->address_table.array[i] = dma; in sci_unsolicited_frame_control_construct() 115 uf->header = &uf_control->headers.array[i]; in sci_unsolicited_frame_control_construct() 136 *frame_header = &uf_control->buffers.array[frame_index].header->data; in sci_unsolicited_frame_control_get_header() 149 *frame_buffer = uf_control->buffers.array[frame_index].buffer; in sci_unsolicited_frame_control_get_buffer() 171 while (lower_32_bits(uf_control->address_table.array[frame_get]) == 0 && in sci_unsolicited_frame_control_release_frame() 172 upper_32_bits(uf_control->address_table.array[frame_get]) == 0 && in sci_unsolicited_frame_control_release_frame() 184 uf_control->buffers.array[frame_index].state = UNSOLICITED_FRAME_RELEASED; in sci_unsolicited_frame_control_release_frame() [all …]
|
/linux/fs/nfs/ ! |
H A D | pnfs_nfs.c | 132 struct pnfs_commit_array *array; in pnfs_find_commit_array_by_lseg() local 134 list_for_each_entry_rcu(array, &fl_cinfo->commits, cinfo_list) { in pnfs_find_commit_array_by_lseg() 135 if (array->lseg == lseg) in pnfs_find_commit_array_by_lseg() 136 return array; in pnfs_find_commit_array_by_lseg() 146 struct pnfs_commit_array *array; in pnfs_add_commit_array() local 148 array = pnfs_find_commit_array_by_lseg(fl_cinfo, lseg); in pnfs_add_commit_array() 149 if (array) in pnfs_add_commit_array() 150 return array; in pnfs_add_commit_array() 163 struct pnfs_commit_array *array; in pnfs_lookup_commit_array() local 166 array = pnfs_find_commit_array_by_lseg(fl_cinfo, lseg); in pnfs_lookup_commit_array() [all …]
|
H A D | dir.c | 154 struct nfs_cache_array_entry array[] __counted_by(size); 206 struct nfs_cache_array *array; in nfs_readdir_folio_init_array() local 208 array = kmap_local_folio(folio, 0); in nfs_readdir_folio_init_array() 209 array->change_attr = change_attr; in nfs_readdir_folio_init_array() 210 array->last_cookie = last_cookie; in nfs_readdir_folio_init_array() 211 array->size = 0; in nfs_readdir_folio_init_array() 212 array->folio_full = 0; in nfs_readdir_folio_init_array() 213 array->folio_is_eof = 0; in nfs_readdir_folio_init_array() 214 array->cookies_are_ordered = 1; in nfs_readdir_folio_init_array() 215 kunmap_local(array); in nfs_readdir_folio_init_array() [all …]
|
/linux/drivers/media/usb/gspca/stv06xx/ ! |
H A D | stv06xx_hdcs.c | 66 } array; member 287 if (width > hdcs->array.width) in hdcs_set_size() 288 width = hdcs->array.width; in hdcs_set_size() 292 if (height + 2 * hdcs->array.border + HDCS_1020_BOTTOM_Y_SKIP in hdcs_set_size() 293 > hdcs->array.height) in hdcs_set_size() 294 height = hdcs->array.height - 2 * hdcs->array.border - in hdcs_set_size() 297 y = (hdcs->array.height - HDCS_1020_BOTTOM_Y_SKIP - height) / 2 in hdcs_set_size() 298 + hdcs->array.top; in hdcs_set_size() 300 if (height > hdcs->array.height) in hdcs_set_size() 301 height = hdcs->array.height; in hdcs_set_size() [all …]
|
/linux/tools/lib/perf/Documentation/examples/ ! |
H A D | sampling.c | 86 __u64 ip, period, *array; in main() local 89 array = event->sample.array; in main() 91 ip = *array; in main() 92 array++; in main() 94 u.val64 = *array; in main() 97 array++; in main() 99 u.val64 = *array; in main() 101 array++; in main() 103 period = *array; in main()
|
/linux/drivers/gpu/drm/imagination/ ! |
H A D | pvr_sync.c | 48 pvr_sync_signal_array_cleanup(struct xarray *array) in pvr_sync_signal_array_cleanup() argument 53 xa_for_each(array, i, sig_sync) in pvr_sync_signal_array_cleanup() 56 xa_destroy(array); in pvr_sync_signal_array_cleanup() 60 pvr_sync_signal_array_add(struct xarray *array, struct drm_file *file, u32 handle, u64 point) in pvr_sync_signal_array_add() argument 95 err = xa_alloc(array, &id, sig_sync, xa_limit_32b, GFP_KERNEL); in pvr_sync_signal_array_add() 107 pvr_sync_signal_array_search(struct xarray *array, u32 handle, u64 point) in pvr_sync_signal_array_search() argument 112 xa_for_each(array, i, sig_sync) { in pvr_sync_signal_array_search() 121 pvr_sync_signal_array_get(struct xarray *array, struct drm_file *file, u32 handle, u64 point) in pvr_sync_signal_array_get() argument 125 sig_sync = pvr_sync_signal_array_search(array, handle, point); in pvr_sync_signal_array_get() 129 return pvr_sync_signal_array_add(array, file, handle, point); in pvr_sync_signal_array_get() [all …]
|
/linux/tools/perf/util/ ! |
H A D | synthetic-events.c | 1577 __u64 *array, u64 type __maybe_unused) in perf_synthesize_sample_weight() argument 1579 *array = data->weight; in perf_synthesize_sample_weight() 1582 *array &= 0xffffffff; in perf_synthesize_sample_weight() 1583 *array |= ((u64)data->ins_lat << 32); in perf_synthesize_sample_weight() 1584 *array |= ((u64)data->weight3 << 48); in perf_synthesize_sample_weight() 1588 static __u64 *copy_read_group_values(__u64 *array, __u64 read_format, in copy_read_group_values() argument 1596 memcpy(array, v, sz); in copy_read_group_values() 1597 array = (void *)array + sz; in copy_read_group_values() 1599 return array; in copy_read_group_values() 1605 __u64 *array; in perf_event__synthesize_sample() local [all …]
|
/linux/kernel/trace/ ! |
H A D | tracing_map.h | 173 #define TRACING_MAP_ARRAY_ELT(array, idx) \ argument 174 (array->pages[idx >> array->entry_shift] + \ 175 ((idx & array->entry_mask) << array->entry_size_shift)) 177 #define TRACING_MAP_ENTRY(array, idx) \ argument 178 ((struct tracing_map_entry *)TRACING_MAP_ARRAY_ELT(array, idx)) 180 #define TRACING_MAP_ELT(array, idx) \ argument 181 ((struct tracing_map_elt **)TRACING_MAP_ARRAY_ELT(array, idx))
|
/linux/drivers/net/wireless/ath/ath9k/ ! |
H A D | calib.h | 36 #define STATIC_INI_ARRAY(array) { \ argument 37 .ia_array = (u32 *)(array), \ 38 .ia_rows = ARRAY_SIZE(array), \ 39 .ia_columns = ARRAY_SIZE(array[0]), \ 42 #define INIT_INI_ARRAY(iniarray, array) do { \ argument 43 (iniarray)->ia_array = (u32 *)(array); \ 44 (iniarray)->ia_rows = ARRAY_SIZE(array); \ 45 (iniarray)->ia_columns = ARRAY_SIZE(array[0]); \
|
/linux/tools/testing/selftests/bpf/progs/ ! |
H A D | wq_failures.c | 21 } array SEC(".maps"); 58 val = bpf_map_lookup_elem(&array, &key); in __flag() 83 val = bpf_map_lookup_elem(&array, &key); in __flag() 107 wq = bpf_map_lookup_elem(&array, &key); in test_wrong_wq_pointer() 111 if (bpf_wq_init(wq, &array, 0)) in test_wrong_wq_pointer() 133 wq = bpf_map_lookup_elem(&array, &key); in test_wrong_wq_pointer_offset() 137 if (bpf_wq_init(wq, &array, 0)) in test_wrong_wq_pointer_offset()
|
/linux/fs/dlm/ ! |
H A D | member.c | 63 struct rcom_slot *ro0, struct dlm_slot *array, in log_slots() argument 73 if (array) { in log_slots() 75 if (!array[i].nodeid) in log_slots() 79 array[i].slot, array[i].nodeid); in log_slots() 164 struct dlm_slot *array; in dlm_slots_assign() local 214 array = kcalloc(array_size, sizeof(*array), GFP_NOFS); in dlm_slots_assign() 215 if (!array) in dlm_slots_assign() 228 kfree(array); in dlm_slots_assign() 232 array[memb->slot - 1].nodeid = memb->nodeid; in dlm_slots_assign() 233 array[memb->slot - 1].slot = memb->slot; in dlm_slots_assign() [all …]
|
/linux/Documentation/admin-guide/ ! |
H A D | md.rst | 22 or, to assemble a partitionable array:: 44 level of the RAID array 92 If a raid5 or raid6 array is both dirty and degraded, it could have 98 For this reason, md will normally refuse to start such an array. This 99 requires the sysadmin to take action to explicitly start the array 104 This option is not really available if the array has the root 106 array, md supports a module parameter ``start_dirty_degraded`` which, 131 An array is ``created`` by writing appropriate superblocks to all 138 An array should be created by a user-space tool. This will write 139 superblocks to all devices. It will usually mark the array as [all …]
|
/linux/sound/soc/intel/avs/ ! |
H A D | debugfs.c | 142 u32 *array, num_elems; in probe_points_write() local 146 ret = parse_int_array_user(from, count, (int **)&array); in probe_points_write() 150 num_elems = *array; in probe_points_write() 151 bytes = sizeof(*array) * num_elems; in probe_points_write() 157 desc = (struct avs_probe_point_desc *)&array[1]; in probe_points_write() 164 kfree(array); in probe_points_write() 179 u32 *array, num_elems; in probe_points_disconnect_write() local 183 ret = parse_int_array_user(from, count, (int **)&array); in probe_points_disconnect_write() 187 num_elems = *array; in probe_points_disconnect_write() 188 bytes = sizeof(*array) * num_elems; in probe_points_disconnect_write() [all …]
|
/linux/tools/testing/radix-tree/ ! |
H A D | iteration_check_2.c | 57 DEFINE_XARRAY(array); in iteration_test2() 64 xa_store(&array, 100, xa_mk_value(100), GFP_KERNEL); in iteration_test2() 65 xa_set_mark(&array, 100, XA_MARK_0); in iteration_test2() 67 if (pthread_create(&threads[0], NULL, iterator, &array)) { in iteration_test2() 71 if (pthread_create(&threads[1], NULL, throbber, &array)) { in iteration_test2() 86 xa_destroy(&array); in iteration_test2()
|
/linux/tools/lib/perf/tests/ ! |
H A D | test-threadmap.c | 14 static int test_threadmap_array(int nr, pid_t *array) in test_threadmap_array() argument 19 threads = perf_thread_map__new_array(nr, array); in test_threadmap_array() 26 perf_thread_map__pid(threads, i) == (array ? array[i] : -1)); in test_threadmap_array() 33 perf_thread_map__pid(threads, 0) == (array ? array[0] : -1)); in test_threadmap_array()
|