Lines Matching full: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()
62 } *args = NULL; in nvif_object_sclass_get() local
67 size = sizeof(*args) + cnt * sizeof(args->sclass.oclass[0]); in nvif_object_sclass_get()
68 if (!(args = kmalloc(size, GFP_KERNEL))) in nvif_object_sclass_get()
70 args->ioctl.version = 0; in nvif_object_sclass_get()
71 args->ioctl.type = NVIF_IOCTL_V0_SCLASS; in nvif_object_sclass_get()
72 args->sclass.version = 0; in nvif_object_sclass_get()
73 args->sclass.count = cnt; in nvif_object_sclass_get()
75 ret = nvif_object_ioctl(object, args, size, NULL); in nvif_object_sclass_get()
76 if (ret == 0 && args->sclass.count <= cnt) in nvif_object_sclass_get()
78 cnt = args->sclass.count; in nvif_object_sclass_get()
79 kfree(args); in nvif_object_sclass_get()
84 *psclass = kcalloc(args->sclass.count, sizeof(**psclass), GFP_KERNEL); in nvif_object_sclass_get()
86 for (i = 0; i < args->sclass.count; i++) { in nvif_object_sclass_get()
87 (*psclass)[i].oclass = args->sclass.oclass[i].oclass; in nvif_object_sclass_get()
88 (*psclass)[i].minver = args->sclass.oclass[i].minver; in nvif_object_sclass_get()
89 (*psclass)[i].maxver = args->sclass.oclass[i].maxver; in nvif_object_sclass_get()
91 ret = args->sclass.count; in nvif_object_sclass_get()
96 kfree(args); in nvif_object_sclass_get()
106 } *args; in nvif_object_mthd() local
111 if (check_add_overflow(sizeof(*args), size, &args_size)) in nvif_object_mthd()
115 args = kmalloc(args_size, GFP_KERNEL); in nvif_object_mthd()
116 if (!args) in nvif_object_mthd()
119 args = (void *)stack; in nvif_object_mthd()
121 args->ioctl.version = 0; in nvif_object_mthd()
122 args->ioctl.type = NVIF_IOCTL_V0_MTHD; in nvif_object_mthd()
123 args->mthd.version = 0; in nvif_object_mthd()
124 args->mthd.method = mthd; in nvif_object_mthd()
126 memcpy(args->mthd.data, data, size); in nvif_object_mthd()
127 ret = nvif_object_ioctl(object, args, args_size, NULL); in nvif_object_mthd()
128 memcpy(data, args->mthd.data, size); in nvif_object_mthd()
129 if (args != (void *)stack) in nvif_object_mthd()
130 kfree(args); in nvif_object_mthd()
140 } args = { in nvif_object_unmap_handle() local
144 nvif_object_ioctl(object, &args, sizeof(args), NULL); in nvif_object_unmap_handle()
154 } *args; in nvif_object_map_handle() local
155 u32 argn = sizeof(*args) + argc; in nvif_object_map_handle()
158 if (!(args = kzalloc(argn, GFP_KERNEL))) in nvif_object_map_handle()
160 args->ioctl.type = NVIF_IOCTL_V0_MAP; in nvif_object_map_handle()
161 memcpy(args->map.data, argv, argc); in nvif_object_map_handle()
163 ret = nvif_object_ioctl(object, args, argn, NULL); in nvif_object_map_handle()
164 *handle = args->map.handle; in nvif_object_map_handle()
165 *length = args->map.length; in nvif_object_map_handle()
166 maptype = args->map.type; in nvif_object_map_handle()
167 kfree(args); in nvif_object_map_handle()
216 } args = { in nvif_object_dtor() local
224 nvif_object_ioctl(object, &args, sizeof(args), NULL); in nvif_object_dtor()
235 } *args; in nvif_object_ctor() local
248 if (check_add_overflow(sizeof(*args), size, &args_size)) { in nvif_object_ctor()
253 args = kmalloc(args_size, GFP_KERNEL); in nvif_object_ctor()
254 if (!args) { in nvif_object_ctor()
261 args->ioctl.version = 0; in nvif_object_ctor()
262 args->ioctl.type = NVIF_IOCTL_V0_NEW; in nvif_object_ctor()
263 args->new.version = 0; in nvif_object_ctor()
264 args->new.object = nvif_handle(object); in nvif_object_ctor()
265 args->new.handle = handle; in nvif_object_ctor()
266 args->new.oclass = oclass; in nvif_object_ctor()
268 memcpy(args->new.data, data, size); in nvif_object_ctor()
269 ret = nvif_object_ioctl(parent, args, args_size, &object->priv); in nvif_object_ctor()
270 memcpy(data, args->new.data, size); in nvif_object_ctor()
271 kfree(args); in nvif_object_ctor()