diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 16:37:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:09:51 -0800 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/tee/optee | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff) | |
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using
git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' |
xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/'
to convert the new alloc_obj() users that had a simple GFP_KERNEL
argument to just drop that argument.
Note that due to the extreme simplicity of the scripting, any slightly
more complex cases spread over multiple lines would not be triggered:
they definitely exist, but this covers the vast bulk of the cases, and
the resulting diff is also then easier to check automatically.
For the same reason the 'flex' versions will be done as a separate
conversion.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/tee/optee')
| -rw-r--r-- | drivers/tee/optee/call.c | 4 | ||||
| -rw-r--r-- | drivers/tee/optee/core.c | 2 | ||||
| -rw-r--r-- | drivers/tee/optee/device.c | 2 | ||||
| -rw-r--r-- | drivers/tee/optee/ffa_abi.c | 8 | ||||
| -rw-r--r-- | drivers/tee/optee/notif.c | 2 | ||||
| -rw-r--r-- | drivers/tee/optee/protmem.c | 2 | ||||
| -rw-r--r-- | drivers/tee/optee/rpc.c | 4 | ||||
| -rw-r--r-- | drivers/tee/optee/smc_abi.c | 4 | ||||
| -rw-r--r-- | drivers/tee/optee/supp.c | 2 |
9 files changed, 15 insertions, 15 deletions
diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c index 5fa3edd9b233..9effe88049e9 100644 --- a/drivers/tee/optee/call.c +++ b/drivers/tee/optee/call.c @@ -293,7 +293,7 @@ struct optee_msg_arg *optee_get_msg_arg(struct tee_context *ctx, /* * No entry was found, let's allocate a new. */ - entry = kzalloc_obj(*entry, GFP_KERNEL); + entry = kzalloc_obj(*entry); if (!entry) { res = ERR_PTR(-ENOMEM); goto out; @@ -404,7 +404,7 @@ int optee_open_session(struct tee_context *ctx, if (rc) goto out; - sess = kzalloc_obj(*sess, GFP_KERNEL); + sess = kzalloc_obj(*sess); if (!sess) { rc = -ENOMEM; goto out; diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index ec07a8e1a585..a52c1f498b99 100644 --- a/drivers/tee/optee/core.c +++ b/drivers/tee/optee/core.c @@ -125,7 +125,7 @@ int optee_open(struct tee_context *ctx, bool cap_memref_null) struct tee_device *teedev = ctx->teedev; struct optee *optee = tee_get_drvdata(teedev); - ctxdata = kzalloc_obj(*ctxdata, GFP_KERNEL); + ctxdata = kzalloc_obj(*ctxdata); if (!ctxdata) return -ENOMEM; diff --git a/drivers/tee/optee/device.c b/drivers/tee/optee/device.c index 3f272c356ce4..bae954e79fdc 100644 --- a/drivers/tee/optee/device.c +++ b/drivers/tee/optee/device.c @@ -81,7 +81,7 @@ static int optee_register_device(const uuid_t *device_uuid, u32 func) struct tee_client_device *optee_device = NULL; int rc; - optee_device = kzalloc_obj(*optee_device, GFP_KERNEL); + optee_device = kzalloc_obj(*optee_device); if (!optee_device) return -ENOMEM; diff --git a/drivers/tee/optee/ffa_abi.c b/drivers/tee/optee/ffa_abi.c index 53ec3204b075..b4372fa268d0 100644 --- a/drivers/tee/optee/ffa_abi.c +++ b/drivers/tee/optee/ffa_abi.c @@ -78,7 +78,7 @@ static int optee_shm_add_ffa_handle(struct optee *optee, struct tee_shm *shm, struct shm_rhash *r; int rc; - r = kmalloc_obj(*r, GFP_KERNEL); + r = kmalloc_obj(*r); if (!r) return -ENOMEM; r->shm = shm; @@ -404,7 +404,7 @@ static const struct tee_shm_pool_ops pool_ffa_ops = { */ static struct tee_shm_pool *optee_ffa_shm_pool_alloc_pages(void) { - struct tee_shm_pool *pool = kzalloc_obj(*pool, GFP_KERNEL); + struct tee_shm_pool *pool = kzalloc_obj(*pool); if (!pool) return ERR_PTR(-ENOMEM); @@ -697,7 +697,7 @@ static int optee_ffa_lend_protmem(struct optee *optee, struct tee_shm *protmem, unsigned int n; int rc; - mem_attr = kzalloc_objs(*mem_attr, ma_count, GFP_KERNEL); + mem_attr = kzalloc_objs(*mem_attr, ma_count); for (n = 0; n < ma_count; n++) { mem_attr[n].receiver = mem_attrs[n] & U16_MAX; mem_attr[n].attrs = mem_attrs[n] >> 16; @@ -1077,7 +1077,7 @@ static int optee_ffa_probe(struct ffa_device *ffa_dev) if (sec_caps & OPTEE_FFA_SEC_CAP_ARG_OFFSET) arg_cache_flags |= OPTEE_SHM_ARG_SHARED; - optee = kzalloc_obj(*optee, GFP_KERNEL); + optee = kzalloc_obj(*optee); if (!optee) return -ENOMEM; diff --git a/drivers/tee/optee/notif.c b/drivers/tee/optee/notif.c index 7ce65c8a07cf..6e85f2f5c516 100644 --- a/drivers/tee/optee/notif.c +++ b/drivers/tee/optee/notif.c @@ -38,7 +38,7 @@ int optee_notif_wait(struct optee *optee, u_int key, u32 timeout) if (key > optee->notif.max_key) return -EINVAL; - entry = kmalloc_obj(*entry, GFP_KERNEL); + entry = kmalloc_obj(*entry); if (!entry) return -ENOMEM; init_completion(&entry->c); diff --git a/drivers/tee/optee/protmem.c b/drivers/tee/optee/protmem.c index 086df220f758..be3abf6e8aa6 100644 --- a/drivers/tee/optee/protmem.c +++ b/drivers/tee/optee/protmem.c @@ -294,7 +294,7 @@ struct tee_protmem_pool *optee_protmem_alloc_dyn_pool(struct optee *optee, u_int pa_width; int rc; - rp = kzalloc_obj(*rp, GFP_KERNEL); + rp = kzalloc_obj(*rp); if (!rp) return ERR_PTR(-ENOMEM); rp->use_case = id; diff --git a/drivers/tee/optee/rpc.c b/drivers/tee/optee/rpc.c index ef80f668a6bc..b0ed4cb49452 100644 --- a/drivers/tee/optee/rpc.c +++ b/drivers/tee/optee/rpc.c @@ -55,7 +55,7 @@ static void handle_rpc_func_cmd_i2c_transfer(struct tee_context *ctx, return; } - params = kmalloc_objs(struct tee_param, arg->num_params, GFP_KERNEL); + params = kmalloc_objs(struct tee_param, arg->num_params); if (!params) { arg->ret = TEEC_ERROR_OUT_OF_MEMORY; return; @@ -191,7 +191,7 @@ static void handle_rpc_supp_cmd(struct tee_context *ctx, struct optee *optee, arg->ret_origin = TEEC_ORIGIN_COMMS; - params = kmalloc_objs(struct tee_param, arg->num_params, GFP_KERNEL); + params = kmalloc_objs(struct tee_param, arg->num_params); if (!params) { arg->ret = TEEC_ERROR_OUT_OF_MEMORY; return; diff --git a/drivers/tee/optee/smc_abi.c b/drivers/tee/optee/smc_abi.c index 3d33b8d6af37..b8a2bdac3208 100644 --- a/drivers/tee/optee/smc_abi.c +++ b/drivers/tee/optee/smc_abi.c @@ -626,7 +626,7 @@ static const struct tee_shm_pool_ops pool_ops = { */ static struct tee_shm_pool *optee_shm_pool_alloc_pages(void) { - struct tee_shm_pool *pool = kzalloc_obj(*pool, GFP_KERNEL); + struct tee_shm_pool *pool = kzalloc_obj(*pool); if (!pool) return ERR_PTR(-ENOMEM); @@ -1816,7 +1816,7 @@ static int optee_probe(struct platform_device *pdev) if (IS_ERR(pool)) return PTR_ERR(pool); - optee = kzalloc_obj(*optee, GFP_KERNEL); + optee = kzalloc_obj(*optee); if (!optee) { rc = -ENOMEM; goto err_free_shm_pool; diff --git a/drivers/tee/optee/supp.c b/drivers/tee/optee/supp.c index 3562cb80a95a..a3d11b1f90fa 100644 --- a/drivers/tee/optee/supp.c +++ b/drivers/tee/optee/supp.c @@ -89,7 +89,7 @@ u32 optee_supp_thrd_req(struct tee_context *ctx, u32 func, size_t num_params, if (!supp->ctx && ctx->supp_nowait) return TEEC_ERROR_COMMUNICATION; - req = kzalloc_obj(*req, GFP_KERNEL); + req = kzalloc_obj(*req); if (!req) return TEEC_ERROR_OUT_OF_MEMORY; |
