Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'qcomtee-fixes-for-6.20' of git://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee into soc/drivers

QCOMTEE fixes for 6.20

Small cleanups for the qcomtee driver to align with recommended coding
practices for the cleanup.h infrastructure.

* tag 'qcomtee-fixes-for-6.20' of git://git.kernel.org/pub/scm/linux/kernel/git/jenswi/linux-tee:
tee: qcomtee: user: Fix confusing cleanup.h syntax
tee: qcomtee: mem: Fix confusing cleanup.h syntax
tee: qcomtee: call: Fix confusing cleanup.h syntax

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

+14 -15
+8 -9
drivers/tee/qcomtee/call.c
··· 395 395 struct tee_ioctl_object_invoke_arg *arg, 396 396 struct tee_param *params) 397 397 { 398 - struct qcomtee_object_invoke_ctx *oic __free(kfree) = NULL; 399 398 struct qcomtee_context_data *ctxdata = ctx->data; 400 - struct qcomtee_arg *u __free(kfree) = NULL; 401 399 struct qcomtee_object *object; 402 400 int i, ret, result; 403 401 ··· 410 412 } 411 413 412 414 /* Otherwise, invoke a QTEE object: */ 413 - oic = qcomtee_object_invoke_ctx_alloc(ctx); 415 + struct qcomtee_object_invoke_ctx *oic __free(kfree) = 416 + qcomtee_object_invoke_ctx_alloc(ctx); 414 417 if (!oic) 415 418 return -ENOMEM; 416 419 417 420 /* +1 for ending QCOMTEE_ARG_TYPE_INV. */ 418 - u = kcalloc(arg->num_params + 1, sizeof(*u), GFP_KERNEL); 421 + struct qcomtee_arg *u __free(kfree) = kcalloc(arg->num_params + 1, sizeof(*u), 422 + GFP_KERNEL); 419 423 if (!u) 420 424 return -ENOMEM; 421 425 ··· 562 562 563 563 static int qcomtee_open(struct tee_context *ctx) 564 564 { 565 - struct qcomtee_context_data *ctxdata __free(kfree) = NULL; 566 - 567 - ctxdata = kzalloc(sizeof(*ctxdata), GFP_KERNEL); 565 + struct qcomtee_context_data *ctxdata __free(kfree) = kzalloc(sizeof(*ctxdata), 566 + GFP_KERNEL); 568 567 if (!ctxdata) 569 568 return -ENOMEM; 570 569 ··· 644 645 static void qcomtee_get_qtee_feature_list(struct tee_context *ctx, u32 id, 645 646 u32 *version) 646 647 { 647 - struct qcomtee_object_invoke_ctx *oic __free(kfree) = NULL; 648 648 struct qcomtee_object *client_env, *service; 649 649 struct qcomtee_arg u[3] = { 0 }; 650 650 int result; 651 651 652 - oic = qcomtee_object_invoke_ctx_alloc(ctx); 652 + struct qcomtee_object_invoke_ctx *oic __free(kfree) = 653 + qcomtee_object_invoke_ctx_alloc(ctx); 653 654 if (!oic) 654 655 return; 655 656
+2 -2
drivers/tee/qcomtee/mem_obj.c
··· 88 88 struct tee_param *param, 89 89 struct tee_context *ctx) 90 90 { 91 - struct qcomtee_mem_object *mem_object __free(kfree) = NULL; 92 91 struct tee_shm *shm; 93 92 int err; 94 93 95 - mem_object = kzalloc(sizeof(*mem_object), GFP_KERNEL); 94 + struct qcomtee_mem_object *mem_object __free(kfree) = kzalloc(sizeof(*mem_object), 95 + GFP_KERNEL); 96 96 if (!mem_object) 97 97 return -ENOMEM; 98 98
+4 -4
drivers/tee/qcomtee/user_obj.c
··· 228 228 { 229 229 struct qcomtee_user_object *uo = to_qcomtee_user_object(object); 230 230 struct qcomtee_context_data *ctxdata = uo->ctx->data; 231 - struct qcomtee_ureq *ureq __free(kfree) = NULL; 232 231 int errno; 233 232 234 - ureq = kzalloc(sizeof(*ureq), GFP_KERNEL); 233 + struct qcomtee_ureq *ureq __free(kfree) = kzalloc(sizeof(*ureq), 234 + GFP_KERNEL); 235 235 if (!ureq) 236 236 return -ENOMEM; 237 237 ··· 367 367 struct tee_param *param, 368 368 struct tee_context *ctx) 369 369 { 370 - struct qcomtee_user_object *user_object __free(kfree) = NULL; 371 370 int err; 372 371 373 - user_object = kzalloc(sizeof(*user_object), GFP_KERNEL); 372 + struct qcomtee_user_object *user_object __free(kfree) = 373 + kzalloc(sizeof(*user_object), GFP_KERNEL); 374 374 if (!user_object) 375 375 return -ENOMEM; 376 376