Lines Matching refs:list
97 static void iio_root_ports_list_free(struct iio_root_ports_list *list) in iio_root_ports_list_free() argument
101 if (list) { in iio_root_ports_list_free()
102 for (idx = 0; idx < list->nr_entries; idx++) in iio_root_ports_list_free()
103 free(list->rps[idx]); in iio_root_ports_list_free()
104 free(list->rps); in iio_root_ports_list_free()
105 free(list); in iio_root_ports_list_free()
110 const struct iio_root_ports_list * const list, u32 domain, u8 bus) in iio_root_port_find_by_notation() argument
115 if (list) { in iio_root_port_find_by_notation()
116 for (idx = 0; idx < list->nr_entries; idx++) { in iio_root_port_find_by_notation()
117 rp = list->rps[idx]; in iio_root_port_find_by_notation()
125 static int iio_root_ports_list_insert(struct iio_root_ports_list *list, in iio_root_ports_list_insert() argument
130 if (list && rp) { in iio_root_ports_list_insert()
131 rp->idx = list->nr_entries++; in iio_root_ports_list_insert()
132 tmp_buf = realloc(list->rps, in iio_root_ports_list_insert()
133 list->nr_entries * sizeof(*list->rps)); in iio_root_ports_list_insert()
139 list->rps = tmp_buf; in iio_root_ports_list_insert()
144 static int iio_mapping(u8 pmu_idx, struct iio_root_ports_list * const list) in iio_mapping() argument
170 if (!rp || iio_root_ports_list_insert(list, rp)) { in iio_mapping()
196 static int iio_root_ports_scan(struct iio_root_ports_list **list) in iio_root_ports_scan() argument
218 *list = tmp_list; in iio_root_ports_scan()
247 static int iio_root_ports_list_filter(struct iio_root_ports_list **list, in iio_root_ports_list_filter() argument
267 rp = iio_root_port_find_by_notation(*list, domain, bus); in iio_root_ports_list_filter()
269 (*list)->rps[rp->idx] = NULL; in iio_root_ports_list_filter()
287 iio_root_ports_list_free(*list); in iio_root_ports_list_filter()
291 *list = tmp_list; in iio_root_ports_list_filter()
298 struct iio_root_ports_list *list) in iostat_event_group() argument
315 for (idx = 0; idx < list->nr_entries; idx++) { in iostat_event_group()
317 list->rps[idx]->pmu_idx, list->rps[idx]->pmu_idx, in iostat_event_group()
318 list->rps[idx]->pmu_idx, list->rps[idx]->pmu_idx); in iostat_event_group()
325 evsel->priv = list->rps[evsel->core.idx / metrics_count]; in iostat_event_group()
327 list->nr_entries = 0; in iostat_event_group()
329 iio_root_ports_list_free(list); in iostat_event_group()