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()
63 } *args = NULL; in nvif_object_sclass_get() local
68 size = sizeof(*args) + cnt * sizeof(args->sclass.oclass[0]); in nvif_object_sclass_get()
69 if (!(args = kmalloc(size, GFP_KERNEL))) in nvif_object_sclass_get()
71 args->ioctl.version = 0; in nvif_object_sclass_get()
72 args->ioctl.type = NVIF_IOCTL_V0_SCLASS; in nvif_object_sclass_get()
73 args->sclass.version = 0; in nvif_object_sclass_get()
74 args->sclass.count = cnt; in nvif_object_sclass_get()
76 ret = nvif_object_ioctl(object, args, size, NULL); in nvif_object_sclass_get()
77 if (ret == 0 && args->sclass.count <= cnt) in nvif_object_sclass_get()
79 cnt = args->sclass.count; in nvif_object_sclass_get()
80 kfree(args); in nvif_object_sclass_get()
85 *psclass = kcalloc(args->sclass.count, sizeof(**psclass), GFP_KERNEL); in nvif_object_sclass_get()
87 for (i = 0; i < args->sclass.count; i++) { in nvif_object_sclass_get()
88 (*psclass)[i].oclass = args->sclass.oclass[i].oclass; in nvif_object_sclass_get()
89 (*psclass)[i].minver = args->sclass.oclass[i].minver; in nvif_object_sclass_get()
90 (*psclass)[i].maxver = args->sclass.oclass[i].maxver; in nvif_object_sclass_get()
92 ret = args->sclass.count; in nvif_object_sclass_get()
97 kfree(args); in nvif_object_sclass_get()
107 } args = { in nvif_object_rd() local
112 int ret = nvif_object_ioctl(object, &args, sizeof(args), NULL); in nvif_object_rd()
117 return args.rd.data; in nvif_object_rd()
126 } args = { in nvif_object_wr() local
132 int ret = nvif_object_ioctl(object, &args, sizeof(args), NULL); in nvif_object_wr()
144 } *args; in nvif_object_mthd() local
148 if (sizeof(*args) + size > sizeof(stack)) { in nvif_object_mthd()
149 if (!(args = kmalloc(sizeof(*args) + size, GFP_KERNEL))) in nvif_object_mthd()
152 args = (void *)stack; in nvif_object_mthd()
154 args->ioctl.version = 0; in nvif_object_mthd()
155 args->ioctl.type = NVIF_IOCTL_V0_MTHD; in nvif_object_mthd()
156 args->mthd.version = 0; in nvif_object_mthd()
157 args->mthd.method = mthd; in nvif_object_mthd()
159 memcpy(args->mthd.data, data, size); in nvif_object_mthd()
160 ret = nvif_object_ioctl(object, args, sizeof(*args) + size, NULL); in nvif_object_mthd()
161 memcpy(data, args->mthd.data, size); in nvif_object_mthd()
162 if (args != (void *)stack) in nvif_object_mthd()
163 kfree(args); in nvif_object_mthd()
173 } args = { in nvif_object_unmap_handle() local
177 nvif_object_ioctl(object, &args, sizeof(args), NULL); in nvif_object_unmap_handle()
187 } *args; in nvif_object_map_handle() local
188 u32 argn = sizeof(*args) + argc; in nvif_object_map_handle()
191 if (!(args = kzalloc(argn, GFP_KERNEL))) in nvif_object_map_handle()
193 args->ioctl.type = NVIF_IOCTL_V0_MAP; in nvif_object_map_handle()
194 memcpy(args->map.data, argv, argc); in nvif_object_map_handle()
196 ret = nvif_object_ioctl(object, args, argn, NULL); in nvif_object_map_handle()
197 *handle = args->map.handle; in nvif_object_map_handle()
198 *length = args->map.length; in nvif_object_map_handle()
199 maptype = args->map.type; in nvif_object_map_handle()
200 kfree(args); in nvif_object_map_handle()
249 } args = { in nvif_object_dtor() local
257 nvif_object_ioctl(object, &args, sizeof(args), NULL); in nvif_object_dtor()
268 } *args; in nvif_object_ctor() local
279 if (!(args = kmalloc(sizeof(*args) + size, GFP_KERNEL))) { in nvif_object_ctor()
286 args->ioctl.version = 0; in nvif_object_ctor()
287 args->ioctl.type = NVIF_IOCTL_V0_NEW; in nvif_object_ctor()
288 args->new.version = 0; in nvif_object_ctor()
289 args->new.route = parent->client->route; in nvif_object_ctor()
290 args->new.token = nvif_handle(object); in nvif_object_ctor()
291 args->new.object = nvif_handle(object); in nvif_object_ctor()
292 args->new.handle = handle; in nvif_object_ctor()
293 args->new.oclass = oclass; in nvif_object_ctor()
295 memcpy(args->new.data, data, size); in nvif_object_ctor()
296 ret = nvif_object_ioctl(parent, args, sizeof(*args) + size, in nvif_object_ctor()
298 memcpy(data, args->new.data, size); in nvif_object_ctor()
299 kfree(args); in nvif_object_ctor()