Lines Matching refs:res
97 struct usnic_vnic_res *res;
121 res = chunk->res[j];
124 usnic_vnic_res_type_to_str(res->type),
125 res->vnic_idx, res->ctrl, !!res->owner);
127 offset += printrow(res->owner, buf + offset,
237 struct usnic_vnic_res *res;
248 ret->res = kcalloc(cnt, sizeof(*(ret->res)), GFP_ATOMIC);
249 if (!ret->res) {
257 res = src->res[i];
258 if (!res->owner) {
260 res->owner = owner;
261 ret->res[ret->cnt++] = res;
277 struct usnic_vnic_res *res;
284 res = chunk->res[i];
285 chunk->res[i] = NULL;
286 res->owner = NULL;
287 vnic->chunks[res->type].free_cnt++;
292 kfree(chunk->res);
306 struct usnic_vnic_res *res;
310 usnic_err("Wrong res count with cnt %d\n", cnt);
315 chunk->res = kcalloc(cnt, sizeof(*(chunk->res)), GFP_KERNEL);
316 if (!chunk->res)
320 res = kzalloc(sizeof(*res), GFP_KERNEL);
321 if (!res) {
325 res->type = type;
326 res->vnic_idx = i;
327 res->vnic = vnic;
328 res->ctrl = vnic_dev_get_res(vnic->vdev,
330 chunk->res[i] = res;
337 kfree(chunk->res[i]);
338 kfree(chunk->res);
346 kfree(chunk->res[i]);
347 kfree(chunk->res);