Lines Matching refs:splitters
22 struct sg_splitter *splitters, bool mapped) in sg_calculate_split() argument
27 struct sg_splitter *curr = splitters; in sg_calculate_split()
31 splitters[i].in_sg0 = NULL; in sg_calculate_split()
32 splitters[i].nents = 0; in sg_calculate_split()
74 return (size || !splitters[0].in_sg0) ? -EINVAL : 0; in sg_calculate_split()
77 static void sg_split_phys(struct sg_splitter *splitters, const int nb_splits) in sg_split_phys() argument
83 for (i = 0, split = splitters; i < nb_splits; i++, split++) { in sg_split_phys()
103 static void sg_split_mapped(struct sg_splitter *splitters, const int nb_splits) in sg_split_mapped() argument
109 for (i = 0, split = splitters; i < nb_splits; i++, split++) { in sg_split_mapped()
155 struct sg_splitter *splitters; in sg_split() local
157 splitters = kcalloc(nb_splits, sizeof(*splitters), gfp_mask); in sg_split()
158 if (!splitters) in sg_split()
162 splitters, false); in sg_split()
168 splitters[i].out_sg = kmalloc_array(splitters[i].nents, in sg_split()
171 if (!splitters[i].out_sg) in sg_split()
178 sg_split_phys(splitters, nb_splits); in sg_split()
181 split_sizes, splitters, true); in sg_split()
184 sg_split_mapped(splitters, nb_splits); in sg_split()
188 out[i] = splitters[i].out_sg; in sg_split()
190 out_mapped_nents[i] = splitters[i].nents; in sg_split()
193 kfree(splitters); in sg_split()
198 kfree(splitters[i].out_sg); in sg_split()
199 kfree(splitters); in sg_split()