• Home
  • Raw
  • Download

Lines Matching refs:chunk

96 	struct usnic_vnic_res_chunk *chunk;  in usnic_vnic_dump()  local
119 chunk = &vnic->chunks[i]; in usnic_vnic_dump()
120 for (j = 0; j < chunk->cnt; j++) { in usnic_vnic_dump()
121 res = chunk->res[j]; in usnic_vnic_dump()
274 void usnic_vnic_put_resources(struct usnic_vnic_res_chunk *chunk) in usnic_vnic_put_resources() argument
279 struct usnic_vnic *vnic = chunk->vnic; in usnic_vnic_put_resources()
281 if (chunk->cnt > 0) { in usnic_vnic_put_resources()
283 while ((i = --chunk->cnt) >= 0) { in usnic_vnic_put_resources()
284 res = chunk->res[i]; in usnic_vnic_put_resources()
285 chunk->res[i] = NULL; in usnic_vnic_put_resources()
292 kfree(chunk->res); in usnic_vnic_put_resources()
293 kfree(chunk); in usnic_vnic_put_resources()
303 struct usnic_vnic_res_chunk *chunk) in usnic_vnic_alloc_res_chunk() argument
314 chunk->cnt = chunk->free_cnt = cnt; in usnic_vnic_alloc_res_chunk()
315 chunk->res = kcalloc(cnt, sizeof(*(chunk->res)), GFP_KERNEL); in usnic_vnic_alloc_res_chunk()
316 if (!chunk->res) in usnic_vnic_alloc_res_chunk()
330 chunk->res[i] = res; in usnic_vnic_alloc_res_chunk()
333 chunk->vnic = vnic; in usnic_vnic_alloc_res_chunk()
337 kfree(chunk->res[i]); in usnic_vnic_alloc_res_chunk()
338 kfree(chunk->res); in usnic_vnic_alloc_res_chunk()
342 static void usnic_vnic_free_res_chunk(struct usnic_vnic_res_chunk *chunk) in usnic_vnic_free_res_chunk() argument
345 for (i = 0; i < chunk->cnt; i++) in usnic_vnic_free_res_chunk()
346 kfree(chunk->res[i]); in usnic_vnic_free_res_chunk()
347 kfree(chunk->res); in usnic_vnic_free_res_chunk()