• Home
  • Raw
  • Download

Lines Matching refs:args

36 	} *args = data;  in nvif_object_ioctl()  local
38 if (size >= sizeof(*args) && args->v0.version == 0) { in nvif_object_ioctl()
40 args->v0.object = nvif_handle(object); in nvif_object_ioctl()
42 args->v0.object = 0; in nvif_object_ioctl()
43 args->v0.owner = NVIF_IOCTL_V0_OWNER_ANY; in nvif_object_ioctl()
64 } *args = NULL; in nvif_object_sclass_get() local
69 size = sizeof(*args) + cnt * sizeof(args->sclass.oclass[0]); in nvif_object_sclass_get()
70 if (!(args = kmalloc(size, GFP_KERNEL))) in nvif_object_sclass_get()
72 args->ioctl.version = 0; in nvif_object_sclass_get()
73 args->ioctl.type = NVIF_IOCTL_V0_SCLASS; in nvif_object_sclass_get()
74 args->sclass.version = 0; in nvif_object_sclass_get()
75 args->sclass.count = cnt; in nvif_object_sclass_get()
77 ret = nvif_object_ioctl(object, args, size, NULL); in nvif_object_sclass_get()
78 if (ret == 0 && args->sclass.count <= cnt) in nvif_object_sclass_get()
80 cnt = args->sclass.count; in nvif_object_sclass_get()
81 kfree(args); in nvif_object_sclass_get()
86 *psclass = kcalloc(args->sclass.count, sizeof(**psclass), GFP_KERNEL); in nvif_object_sclass_get()
88 for (i = 0; i < args->sclass.count; i++) { in nvif_object_sclass_get()
89 (*psclass)[i].oclass = args->sclass.oclass[i].oclass; in nvif_object_sclass_get()
90 (*psclass)[i].minver = args->sclass.oclass[i].minver; in nvif_object_sclass_get()
91 (*psclass)[i].maxver = args->sclass.oclass[i].maxver; in nvif_object_sclass_get()
93 ret = args->sclass.count; in nvif_object_sclass_get()
98 kfree(args); in nvif_object_sclass_get()
108 } args = { in nvif_object_rd() local
113 int ret = nvif_object_ioctl(object, &args, sizeof(args), NULL); in nvif_object_rd()
118 return args.rd.data; in nvif_object_rd()
127 } args = { in nvif_object_wr() local
133 int ret = nvif_object_ioctl(object, &args, sizeof(args), NULL); in nvif_object_wr()
145 } *args; in nvif_object_mthd() local
149 if (sizeof(*args) + size > sizeof(stack)) { in nvif_object_mthd()
150 if (!(args = kmalloc(sizeof(*args) + size, GFP_KERNEL))) in nvif_object_mthd()
153 args = (void *)stack; in nvif_object_mthd()
155 args->ioctl.version = 0; in nvif_object_mthd()
156 args->ioctl.type = NVIF_IOCTL_V0_MTHD; in nvif_object_mthd()
157 args->mthd.version = 0; in nvif_object_mthd()
158 args->mthd.method = mthd; in nvif_object_mthd()
160 memcpy(args->mthd.data, data, size); in nvif_object_mthd()
161 ret = nvif_object_ioctl(object, args, sizeof(*args) + size, NULL); in nvif_object_mthd()
162 memcpy(data, args->mthd.data, size); in nvif_object_mthd()
163 if (args != (void *)stack) in nvif_object_mthd()
164 kfree(args); in nvif_object_mthd()
174 } args = { in nvif_object_unmap_handle() local
178 nvif_object_ioctl(object, &args, sizeof(args), NULL); in nvif_object_unmap_handle()
188 } *args; in nvif_object_map_handle() local
189 u32 argn = sizeof(*args) + argc; in nvif_object_map_handle()
192 if (!(args = kzalloc(argn, GFP_KERNEL))) in nvif_object_map_handle()
194 args->ioctl.type = NVIF_IOCTL_V0_MAP; in nvif_object_map_handle()
195 memcpy(args->map.data, argv, argc); in nvif_object_map_handle()
197 ret = nvif_object_ioctl(object, args, argn, NULL); in nvif_object_map_handle()
198 *handle = args->map.handle; in nvif_object_map_handle()
199 *length = args->map.length; in nvif_object_map_handle()
200 maptype = args->map.type; in nvif_object_map_handle()
201 kfree(args); in nvif_object_map_handle()
250 } args = { in nvif_object_fini() local
258 nvif_object_ioctl(object, &args, sizeof(args), NULL); in nvif_object_fini()
269 } *args; in nvif_object_init() local
279 if (!(args = kmalloc(sizeof(*args) + size, GFP_KERNEL))) { in nvif_object_init()
284 args->ioctl.version = 0; in nvif_object_init()
285 args->ioctl.type = NVIF_IOCTL_V0_NEW; in nvif_object_init()
286 args->new.version = 0; in nvif_object_init()
287 args->new.route = parent->client->route; in nvif_object_init()
288 args->new.token = nvif_handle(object); in nvif_object_init()
289 args->new.object = nvif_handle(object); in nvif_object_init()
290 args->new.handle = handle; in nvif_object_init()
291 args->new.oclass = oclass; in nvif_object_init()
293 memcpy(args->new.data, data, size); in nvif_object_init()
294 ret = nvif_object_ioctl(parent, args, sizeof(*args) + size, in nvif_object_init()
296 memcpy(data, args->new.data, size); in nvif_object_init()
297 kfree(args); in nvif_object_init()