Lines Matching defs:cnt
120 for (j = 0; j < chunk->cnt; j++) {
140 u16 cnt)
146 spec->resources[i].cnt = cnt;
167 if (min_spec->resources[i].cnt >
168 res_spec->resources[i].cnt)
189 res_cnt = res_spec->resources[i].cnt;
208 res_cnt = res_spec->resources[i].cnt;
223 return vnic->chunks[type].cnt;
234 int cnt, void *owner)
240 if (usnic_vnic_res_free_cnt(vnic, type) < cnt || cnt < 0 || !owner)
247 if (cnt > 0) {
248 ret->res = kcalloc(cnt, sizeof(*(ret->res)), GFP_ATOMIC);
256 for (i = 0; i < src->cnt && ret->cnt < cnt; i++) {
261 ret->res[ret->cnt++] = res;
269 WARN_ON(ret->cnt != cnt);
281 if (chunk->cnt > 0) {
283 while ((i = --chunk->cnt) >= 0) {
305 int cnt, err, i;
308 cnt = vnic_dev_get_res_count(vnic->vdev, _to_vnic_res_type(type));
309 if (cnt < 1) {
310 usnic_err("Wrong res count with cnt %d\n", cnt);
314 chunk->cnt = chunk->free_cnt = cnt;
315 chunk->res = kcalloc(cnt, sizeof(*(chunk->res)), GFP_KERNEL);
319 for (i = 0; i < cnt; i++) {
345 for (i = 0; i < chunk->cnt; i++)