• Home
  • Raw
  • Download

Lines Matching refs:cnt

120 		for (j = 0; j < chunk->cnt; j++) {  in usnic_vnic_dump()
140 u16 cnt) in usnic_vnic_res_spec_update() argument
146 spec->resources[i].cnt = cnt; in usnic_vnic_res_spec_update()
167 if (min_spec->resources[i].cnt > in usnic_vnic_res_spec_satisfied()
168 res_spec->resources[i].cnt) in usnic_vnic_res_spec_satisfied()
189 res_cnt = res_spec->resources[i].cnt; in usnic_vnic_spec_dump()
208 res_cnt = res_spec->resources[i].cnt; in usnic_vnic_check_room()
223 return vnic->chunks[type].cnt; in usnic_vnic_res_cnt()
234 int cnt, void *owner) in usnic_vnic_get_resources() argument
240 if (usnic_vnic_res_free_cnt(vnic, type) < cnt || cnt < 0 || !owner) in usnic_vnic_get_resources()
247 if (cnt > 0) { in usnic_vnic_get_resources()
248 ret->res = kcalloc(cnt, sizeof(*(ret->res)), GFP_ATOMIC); in usnic_vnic_get_resources()
256 for (i = 0; i < src->cnt && ret->cnt < cnt; i++) { in usnic_vnic_get_resources()
261 ret->res[ret->cnt++] = res; in usnic_vnic_get_resources()
269 WARN_ON(ret->cnt != cnt); in usnic_vnic_get_resources()
281 if (chunk->cnt > 0) { in usnic_vnic_put_resources()
283 while ((i = --chunk->cnt) >= 0) { in usnic_vnic_put_resources()
305 int cnt, err, i; in usnic_vnic_alloc_res_chunk() local
308 cnt = vnic_dev_get_res_count(vnic->vdev, _to_vnic_res_type(type)); in usnic_vnic_alloc_res_chunk()
309 if (cnt < 1) { in usnic_vnic_alloc_res_chunk()
310 usnic_err("Wrong res count with cnt %d\n", cnt); in usnic_vnic_alloc_res_chunk()
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()
319 for (i = 0; i < cnt; i++) { in usnic_vnic_alloc_res_chunk()
345 for (i = 0; i < chunk->cnt; i++) in usnic_vnic_free_res_chunk()