Home
last modified time | relevance | path

Searched refs:array (Results 1 – 25 of 665) sorted by relevance

12345678910>>...27

/linux/drivers/misc/vmw_vmci/
H A Dvmci_handle_array.c13 struct vmci_handle_arr *array; in vmci_handle_arr_create() local
22 array = kmalloc_flex(*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 Dvmci_handle_array.h27 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/sound/hda/core/
H A Darray.c19 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 Darraymap.c23 static void bpf_array_free_percpu(struct bpf_array *array) in bpf_array_free_percpu() argument
27 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_free_percpu()
28 free_percpu(array->pptrs[i]); in bpf_array_free_percpu()
33 static int bpf_array_alloc_percpu(struct bpf_array *array) in bpf_array_alloc_percpu() argument
38 for (i = 0; i < array->map.max_entries; i++) { in bpf_array_alloc_percpu()
39 ptr = bpf_map_alloc_percpu(&array->map, array->elem_size, 8, in bpf_array_alloc_percpu()
42 bpf_array_free_percpu(array); in bpf_array_alloc_percpu()
45 array->pptrs[i] = ptr; in bpf_array_alloc_percpu()
91 struct bpf_array *array; in array_map_alloc() local
161 array_map_elem_ptr(struct bpf_array * array,u32 index) array_map_elem_ptr() argument
169 struct bpf_array *array = container_of(map, struct bpf_array, map); array_map_lookup_elem() local
181 struct bpf_array *array = container_of(map, struct bpf_array, map); array_map_get_hash() local
192 struct bpf_array *array = container_of(map, struct bpf_array, map); array_map_direct_value_addr() local
206 struct bpf_array *array = container_of(map, struct bpf_array, map); array_map_direct_value_meta() local
222 struct bpf_array *array = container_of(map, struct bpf_array, map); array_map_gen_lookup() local
255 struct bpf_array *array = container_of(map, struct bpf_array, map); percpu_array_map_lookup_elem() local
267 struct bpf_array *array = container_of(map, struct bpf_array, map); percpu_array_map_gen_lookup() local
298 struct bpf_array *array = container_of(map, struct bpf_array, map); percpu_array_map_lookup_percpu_elem() local
312 struct bpf_array *array = container_of(map, struct bpf_array, map); bpf_percpu_array_copy() local
366 struct bpf_array *array = container_of(map, struct bpf_array, map); array_map_update_elem() local
405 struct bpf_array *array = container_of(map, struct bpf_array, map); bpf_percpu_array_update() local
457 array_map_vmalloc_addr(struct bpf_array * array) array_map_vmalloc_addr() argument
464 struct bpf_array *array = container_of(map, struct bpf_array, map); array_map_free_internal_structs() local
478 struct bpf_array *array = container_of(map, struct bpf_array, map); array_map_free() local
531 struct bpf_array *array = container_of(map, struct bpf_array, map); percpu_array_map_seq_show_elem() local
580 struct bpf_array *array = container_of(map, struct bpf_array, map); array_map_mmap() local
613 struct bpf_array *array; bpf_array_map_seq_start() local
632 struct bpf_array *array; bpf_array_map_seq_next() local
652 struct bpf_array *array = container_of(map, struct bpf_array, map); __bpf_array_map_seq_show() local
703 struct bpf_array *array = container_of(map, struct bpf_array, map); bpf_iter_init_array_map() local
751 struct bpf_array *array; bpf_for_each_array_elem() local
782 struct bpf_array *array = container_of(map, struct bpf_array, map); array_map_mem_usage() local
864 struct bpf_array *array = container_of(map, struct bpf_array, map); fd_array_map_free() local
903 struct bpf_array *array = container_of(map, struct bpf_array, map); bpf_fd_array_map_update_elem() local
934 struct bpf_array *array = container_of(map, struct bpf_array, map); __fd_array_map_delete_elem() local
1015 struct bpf_array *array = container_of(map, struct bpf_array, map); bpf_fd_array_map_clear() local
1301 struct bpf_array *array = container_of(map, struct bpf_array, map); perf_event_fd_array_release() local
1418 struct bpf_array *array = container_of(map, struct bpf_array, map); array_of_map_gen_lookup() local
[all...]
H A Dreuseport_array.c52 struct reuseport_array *array = reuseport_array(map); in reuseport_array_lookup_elem() local
55 if (unlikely(index >= array->map.max_entries)) in reuseport_array_lookup_elem()
58 return rcu_dereference(array->ptrs[index]); in reuseport_array_lookup_elem()
64 struct reuseport_array *array = reuseport_array(map); in reuseport_array_delete_elem() local
72 if (!rcu_access_pointer(array->ptrs[index])) in reuseport_array_delete_elem()
77 sk = rcu_dereference_protected(array->ptrs[index], in reuseport_array_delete_elem()
82 RCU_INIT_POINTER(array->ptrs[index], NULL); in reuseport_array_delete_elem()
96 struct reuseport_array *array = reuseport_array(map); in reuseport_array_free() local
127 sk = rcu_dereference(array->ptrs[i]); in reuseport_array_free()
137 RCU_INIT_POINTER(array->ptrs[i], NULL); in reuseport_array_free()
[all …]
/linux/drivers/infiniband/hw/mthca/
H A Dmthca_allocator.c113 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/fs/nfs/
H A Dpnfs_nfs.c132 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 …]
/linux/scripts/coccinelle/misc/
H A Dflexible_array.cocci5 /// 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/include/linux/
H A Dassoc_array.h54 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/drivers/scsi/isci/
H A Dunsolicited_frame_control.c85 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/drivers/android/binder/range_alloc/
H A Dmod.rs10 mod array; module
11 use self::array::{ArrayRangeAllocator, EmptyArrayAlloc};
131 Impl::Array(array) => array.free_oneway_space(), in free_oneway_space()
139 Impl::Array(array) => array.count_buffers(), in count_buffers()
147 Impl::Array(array) => array.debug_print(m), in debug_print()
171 Impl::Array(array) if array.is_full() => { in reserve_new()
185 TreeRangeAllocator::from_array(array.total_size(), &mut array.ranges, allocs); in reserve_new()
190 Impl::Array(array) => { in reserve_new()
192 array.reserve_new(args.debug_id, args.size, args.is_oneway, args.pid)?; in reserve_new()
230 Impl::Array(array) => array.reservation_abort(offset), in reservation_abort()
[all …]
/linux/drivers/media/usb/gspca/stv06xx/
H A Dstv06xx_hdcs.c66 } 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/drivers/dma-buf/
H A Ddma-fence-unwrap.c11 #include <linux/dma-fence-array.h>
17 /* Internal helper to start new array iteration, don't use directly */
21 cursor->array = dma_fence_chain_contained(cursor->chain); in __dma_fence_unwrap_array()
23 return dma_fence_array_first(cursor->array); in __dma_fence_unwrap_array()
54 tmp = dma_fence_array_next(cursor->array, cursor->index); in dma_fence_unwrap_next()
83 * dma_fence_dedup_array - Sort and deduplicate an array of dma_fence pointers
85 * @num_fences: Number of entries in the @fences array
87 * Sorts the input array by context, then removes duplicate
90 * The array is modified in-place and unreferenced duplicate fences are released
94 * Return: Number of unique fences remaining in the array
122 struct dma_fence *tmp, *unsignaled = NULL, **array; __dma_fence_unwrap_merge() local
[all...]
/linux/scripts/
H A Dtracepoint-update.c35 const char **array; member
44 const char **array = *vals; in add_string() local
49 array = realloc(array, sizeof(char *) * size); in add_string()
50 if (!array) { in add_string()
56 *vals = array; in add_string()
59 array[(*count)++] = str; in add_string()
88 etrace->array = NULL; in make_trace_array()
108 etrace->array = vals; in make_trace_array()
112 static int find_event(const char *str, void *array, size_t size) in find_event() argument
114 return bsearch(&str, array, size, sizeof(char *), compare_strings) != NULL; in find_event()
[all …]
/linux/drivers/gpu/drm/imagination/
H A Dpvr_sync.c48 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, fil in pvr_sync_signal_array_get()
133 pvr_sync_signal_array_collect_ops(struct xarray * array,struct drm_file * file,u32 sync_op_count,const struct drm_pvr_sync_op * sync_ops) pvr_sync_signal_array_collect_ops() argument
160 pvr_sync_signal_array_update_fences(struct xarray * array,u32 sync_op_count,const struct drm_pvr_sync_op * sync_ops,struct dma_fence * done_fence) pvr_sync_signal_array_update_fences() argument
189 pvr_sync_signal_array_push_fences(struct xarray * array) pvr_sync_signal_array_push_fences() argument
[all...]
/linux/tools/lib/perf/Documentation/examples/
H A Dsampling.c86 __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/tools/perf/util/
H A Dsynthetic-events.c1582 __u64 *array, u64 type __maybe_unused) in perf_synthesize_sample_weight() argument
1584 *array = data->weight; in perf_synthesize_sample_weight()
1587 *array &= 0xffffffff; in perf_synthesize_sample_weight()
1588 *array |= ((u64)data->ins_lat << 32); in perf_synthesize_sample_weight()
1589 *array |= ((u64)data->weight3 << 48); in perf_synthesize_sample_weight()
1593 static __u64 *copy_read_group_values(__u64 *array, __u64 read_format, in copy_read_group_values() argument
1601 memcpy(array, v, sz); in copy_read_group_values()
1602 array = (void *)array + sz; in copy_read_group_values()
1604 return array; in copy_read_group_values()
1610 __u64 *array; in perf_event__synthesize_sample() local
[all …]
H A Devsel.c277 * PERF_SAMPLE_IDENTIFIER) in a sample event i.e. in the array of struct
3011 const __u64 *array = event->sample.array; in perf_evsel__parse_id_sample()
3015 array += ((event->header.size - in perf_evsel__parse_id_sample()
3019 sample->id = *array; in perf_evsel__parse_id_sample()
3020 array--; in perf_evsel__parse_id_sample()
3024 u.val64 = *array; in perf_evsel__parse_id_sample()
3032 array--; in perf_evsel__parse_id_sample()
3036 sample->stream_id = *array; in perf_evsel__parse_id_sample()
3037 array in perf_evsel__parse_id_sample()
3005 const __u64 *array = event->sample.array; perf_evsel__parse_id_sample() local
3090 perf_parse_sample_weight(struct perf_sample * data,const __u64 * array,u64 type) perf_parse_sample_weight() argument
3177 u64 *array = data->raw_data; __set_offcpu_sample() local
3209 const __u64 *array; evsel__parse_sample() local
3595 const __u64 *array; evsel__parse_sample_timestamp() local
[all...]
/linux/net/netfilter/
H A Dnft_set_rbtree.c34 struct nft_array __rcu *array; member
112 struct nft_array *array = rcu_dereference(priv->array); in nft_rbtree_lookup() local
119 if (!array) in nft_rbtree_lookup()
122 interval = bsearch(&ctx, array->intervals, array->num_intervals, in nft_rbtree_lookup()
170 struct nft_array *array = rcu_dereference(priv->array); in nft_rbtree_get() local
179 if (!array) in nft_rbtree_get()
182 interval = bsearch(&ctx, array in nft_rbtree_get()
541 nft_array_intervals_alloc(struct nft_array * array,u32 max_intervals) nft_array_intervals_alloc() argument
561 struct nft_array *array; nft_array_alloc() local
605 struct nft_array *array; nft_array_may_resize() local
979 __nft_array_free(struct nft_array * array) __nft_array_free() argument
990 struct nft_array *array; nft_rbtree_destroy() local
1031 struct nft_array *array = container_of(rcu_head, struct nft_array, rcu_head); nft_array_free_rcu() local
[all...]
/linux/kernel/trace/
H A Dtracing_map.h25 * zeroed array of struct tracing_map_entry (stored in the map field
28 * variable and a pointer named 'val'. This array of struct
32 * this indirectly via an array of tracing_map_sort_entry - see the
39 * It then uses this key, truncated to the array size, as an index
40 * into the array of tracing_map_entries. If the value of the 'key'
63 * tracing_map_entries in the tracing_map_entry array which can be
66 * with the tracing_map_entry array in the tracing_map. Because of
68 * tracing_map_entry array is always twice the maximum number of
74 * both the tracing_map_entry array and a pool of max_elts
78 * The tracing_map_entry array i
173 TRACING_MAP_ARRAY_ELT(array,idx) global() argument
177 TRACING_MAP_ENTRY(array,idx) global() argument
180 TRACING_MAP_ELT(array,idx) global() argument
[all...]
/linux/fs/dlm/
H A Dmember.c63 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 = kzalloc_objs(*array, array_size, 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/drivers/net/wireless/ath/ath9k/
H A Dcalib.h36 #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/Documentation/core-api/
H A Dassoc_array.rst8 This associative array implementation is an object container with the following
18 2. Objects do not need to contain linkage blocks for use by the array. This
20 Rather, the array is made up of metadata blocks that point to objects.
22 3. Objects require index keys to locate them within the array.
25 already in the array will replace the old object.
32 7. Index keys can include a hash to scatter objects throughout the array.
34 8. The array can iterated over. The objects will not necessarily come out in
37 9. The array can be iterated over while it is being modified, provided the
43 10. Objects in the array can be looked up by means of their index key.
45 11. Objects can be looked up while the array is being modified, provided the
[all …]
/linux/tools/testing/selftests/bpf/progs/
H A Dwq_failures.c21 } 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()
158 val = bpf_map_lookup_elem(&array, &key);
164 if (bpf_wq_init(wq, &array, 0) != 0)
/linux/lib/
H A Dstring_helpers.c142 int parse_int_array(const char *buf, size_t count, int **array) in parse_int_array() argument
155 *array = ints; in parse_int_array()
165 * @array: Returned pointer to sequence of integers
167 * On success @array is allocated and initialized with a sequence of
171 * Caller takes responsibility for freeing @array when it is no longer
174 int parse_int_array_user(const char __user *from, size_t count, int **array) in parse_int_array_user() argument
183 ret = parse_int_array(buf, count, array); in parse_int_array_user()
752 * kasprintf_strarray - allocate and fill array of sequential strings
761 * Returns array of strings or NULL when memory can't be allocated.
786 * in an array an
794 kfree_strarray(char ** array,size_t n) kfree_strarray() argument
808 char **array; global() member
814 struct strarray *array = res; devm_kfree_strarray() local
924 match_string(const char * const * array,size_t n,const char * string) match_string() argument
958 __sysfs_match_string(const char * const * array,size_t n,const char * str) __sysfs_match_string() argument
[all...]

12345678910>>...27