Lines Matching refs:res
96 struct usnic_vnic_res *res;
120 res = chunk->res[j];
123 usnic_vnic_res_type_to_str(res->type),
124 res->vnic_idx, res->ctrl, !!res->owner);
126 offset += printrow(res->owner, buf + offset,
236 struct usnic_vnic_res *res;
247 ret->res = kcalloc(cnt, sizeof(*(ret->res)), GFP_ATOMIC);
248 if (!ret->res) {
256 res = src->res[i];
257 if (!res->owner) {
259 res->owner = owner;
260 ret->res[ret->cnt++] = res;
276 struct usnic_vnic_res *res;
283 res = chunk->res[i];
284 chunk->res[i] = NULL;
285 res->owner = NULL;
286 vnic->chunks[res->type].free_cnt++;
291 kfree(chunk->res);
305 struct usnic_vnic_res *res;
309 usnic_err("Wrong res count with cnt %d\n", cnt);
314 chunk->res = kcalloc(cnt, sizeof(*(chunk->res)), GFP_KERNEL);
315 if (!chunk->res)
319 res = kzalloc(sizeof(*res), GFP_KERNEL);
320 if (!res) {
324 res->type = type;
325 res->vnic_idx = i;
326 res->vnic = vnic;
327 res->ctrl = vnic_dev_get_res(vnic->vdev,
329 chunk->res[i] = res;
336 kfree(chunk->res[i]);
337 kfree(chunk->res);
345 kfree(chunk->res[i]);
346 kfree(chunk->res);