Lines Matching defs:cnt
119 for (j = 0; j < chunk->cnt; j++) {
139 u16 cnt)
145 spec->resources[i].cnt = cnt;
166 if (min_spec->resources[i].cnt >
167 res_spec->resources[i].cnt)
188 res_cnt = res_spec->resources[i].cnt;
207 res_cnt = res_spec->resources[i].cnt;
222 return vnic->chunks[type].cnt;
233 int cnt, void *owner)
239 if (usnic_vnic_res_free_cnt(vnic, type) < cnt || cnt < 0 || !owner)
246 if (cnt > 0) {
247 ret->res = kcalloc(cnt, sizeof(*(ret->res)), GFP_ATOMIC);
255 for (i = 0; i < src->cnt && ret->cnt < cnt; i++) {
260 ret->res[ret->cnt++] = res;
268 WARN_ON(ret->cnt != cnt);
280 if (chunk->cnt > 0) {
282 while ((i = --chunk->cnt) >= 0) {
304 int cnt, err, i;
307 cnt = vnic_dev_get_res_count(vnic->vdev, _to_vnic_res_type(type));
308 if (cnt < 1) {
309 usnic_err("Wrong res count with cnt %d\n", cnt);
313 chunk->cnt = chunk->free_cnt = cnt;
314 chunk->res = kcalloc(cnt, sizeof(*(chunk->res)), GFP_KERNEL);
318 for (i = 0; i < cnt; i++) {
344 for (i = 0; i < chunk->cnt; i++)