summaryrefslogtreecommitdiff
path: root/drivers/tee
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/tee
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (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')
-rw-r--r--drivers/tee/amdtee/call.c4
-rw-r--r--drivers/tee/amdtee/core.c10
-rw-r--r--drivers/tee/amdtee/shm_pool.c2
-rw-r--r--drivers/tee/optee/call.c4
-rw-r--r--drivers/tee/optee/core.c2
-rw-r--r--drivers/tee/optee/device.c2
-rw-r--r--drivers/tee/optee/ffa_abi.c8
-rw-r--r--drivers/tee/optee/notif.c2
-rw-r--r--drivers/tee/optee/protmem.c2
-rw-r--r--drivers/tee/optee/rpc.c4
-rw-r--r--drivers/tee/optee/smc_abi.c4
-rw-r--r--drivers/tee/optee/supp.c2
-rw-r--r--drivers/tee/qcomtee/call.c2
-rw-r--r--drivers/tee/qcomtee/core.c2
-rw-r--r--drivers/tee/qcomtee/qcomtee_object.h2
-rw-r--r--drivers/tee/qcomtee/shm.c2
-rw-r--r--drivers/tee/qcomtee/user_obj.c4
-rw-r--r--drivers/tee/tee_core.c8
-rw-r--r--drivers/tee/tee_heap.c8
-rw-r--r--drivers/tee/tee_shm.c12
-rw-r--r--drivers/tee/tee_shm_pool.c2
-rw-r--r--drivers/tee/tstee/core.c8
22 files changed, 48 insertions, 48 deletions
diff --git a/drivers/tee/amdtee/call.c b/drivers/tee/amdtee/call.c
index 3d25cee5c7d0..441b2ceaafc3 100644
--- a/drivers/tee/amdtee/call.c
+++ b/drivers/tee/amdtee/call.c
@@ -134,7 +134,7 @@ static u32 get_ta_refcount(u32 ta_handle)
if (ta_data->ta_handle == ta_handle)
return ++ta_data->refcount;
- ta_data = kzalloc_obj(*ta_data, GFP_KERNEL);
+ ta_data = kzalloc_obj(*ta_data);
if (ta_data) {
ta_data->ta_handle = ta_handle;
ta_data->refcount = 1;
@@ -293,7 +293,7 @@ int handle_map_shmem(u32 count, struct shmem_desc *start, u32 *buf_id)
if (!count || !start || !buf_id)
return -EINVAL;
- cmd = kzalloc_obj(*cmd, GFP_KERNEL);
+ cmd = kzalloc_obj(*cmd);
if (!cmd)
return -ENOMEM;
diff --git a/drivers/tee/amdtee/core.c b/drivers/tee/amdtee/core.c
index 1ff4834722f7..a1347d04b3ac 100644
--- a/drivers/tee/amdtee/core.c
+++ b/drivers/tee/amdtee/core.c
@@ -38,7 +38,7 @@ static int amdtee_open(struct tee_context *ctx)
{
struct amdtee_context_data *ctxdata;
- ctxdata = kzalloc_obj(*ctxdata, GFP_KERNEL);
+ ctxdata = kzalloc_obj(*ctxdata);
if (!ctxdata)
return -ENOMEM;
@@ -122,7 +122,7 @@ static struct amdtee_session *alloc_session(struct amdtee_context_data *ctxdata,
}
/* Allocate a new session and add to list */
- sess = kzalloc_obj(*sess, GFP_KERNEL);
+ sess = kzalloc_obj(*sess);
if (sess) {
sess->ta_handle = ta_handle;
kref_init(&sess->refcount);
@@ -351,7 +351,7 @@ int amdtee_map_shmem(struct tee_shm *shm)
if (!shm)
return -EINVAL;
- shmnode = kmalloc_obj(*shmnode, GFP_KERNEL);
+ shmnode = kmalloc_obj(*shmnode);
if (!shmnode)
return -ENOMEM;
@@ -465,11 +465,11 @@ static int __init amdtee_driver_init(void)
return rc;
}
- drv_data = kzalloc_obj(*drv_data, GFP_KERNEL);
+ drv_data = kzalloc_obj(*drv_data);
if (!drv_data)
return -ENOMEM;
- amdtee = kzalloc_obj(*amdtee, GFP_KERNEL);
+ amdtee = kzalloc_obj(*amdtee);
if (!amdtee) {
rc = -ENOMEM;
goto err_kfree_drv_data;
diff --git a/drivers/tee/amdtee/shm_pool.c b/drivers/tee/amdtee/shm_pool.c
index fcb0d5da4bfd..c330e8e9168a 100644
--- a/drivers/tee/amdtee/shm_pool.c
+++ b/drivers/tee/amdtee/shm_pool.c
@@ -59,7 +59,7 @@ static const struct tee_shm_pool_ops pool_ops = {
struct tee_shm_pool *amdtee_config_shm(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);
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;
diff --git a/drivers/tee/qcomtee/call.c b/drivers/tee/qcomtee/call.c
index cd138adb5e17..ba9af41ec8b5 100644
--- a/drivers/tee/qcomtee/call.c
+++ b/drivers/tee/qcomtee/call.c
@@ -707,7 +707,7 @@ static int qcomtee_probe(struct platform_device *pdev)
struct qcomtee *qcomtee;
int err;
- qcomtee = kzalloc_obj(*qcomtee, GFP_KERNEL);
+ qcomtee = kzalloc_obj(*qcomtee);
if (!qcomtee)
return -ENOMEM;
diff --git a/drivers/tee/qcomtee/core.c b/drivers/tee/qcomtee/core.c
index ab477bbc8439..b1cb50e434f0 100644
--- a/drivers/tee/qcomtee/core.c
+++ b/drivers/tee/qcomtee/core.c
@@ -54,7 +54,7 @@ qcomtee_qtee_object_alloc(struct qcomtee_object_invoke_ctx *oic,
struct qcomtee *qcomtee = tee_get_drvdata(oic->ctx->teedev);
struct qcomtee_object *object;
- object = kzalloc_obj(*object, GFP_KERNEL);
+ object = kzalloc_obj(*object);
if (!object)
return NULL_QCOMTEE_OBJECT;
diff --git a/drivers/tee/qcomtee/qcomtee_object.h b/drivers/tee/qcomtee/qcomtee_object.h
index d763f90c62bb..8b4401ecad48 100644
--- a/drivers/tee/qcomtee/qcomtee_object.h
+++ b/drivers/tee/qcomtee/qcomtee_object.h
@@ -176,7 +176,7 @@ qcomtee_object_invoke_ctx_alloc(struct tee_context *ctx)
{
struct qcomtee_object_invoke_ctx *oic;
- oic = kzalloc_obj(*oic, GFP_KERNEL);
+ oic = kzalloc_obj(*oic);
if (oic)
oic->ctx = ctx;
return oic;
diff --git a/drivers/tee/qcomtee/shm.c b/drivers/tee/qcomtee/shm.c
index 7bef13767e25..b67909ef3f46 100644
--- a/drivers/tee/qcomtee/shm.c
+++ b/drivers/tee/qcomtee/shm.c
@@ -140,7 +140,7 @@ struct tee_shm_pool *qcomtee_shm_pool_alloc(void)
{
struct tee_shm_pool *pool;
- pool = kzalloc_obj(*pool, GFP_KERNEL);
+ pool = kzalloc_obj(*pool);
if (!pool)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/tee/qcomtee/user_obj.c b/drivers/tee/qcomtee/user_obj.c
index d19c6589574a..10452fcc7ccb 100644
--- a/drivers/tee/qcomtee/user_obj.c
+++ b/drivers/tee/qcomtee/user_obj.c
@@ -326,7 +326,7 @@ static void qcomtee_user_object_release(struct qcomtee_object *object)
if (!uo->notify)
goto out_no_notify;
- ureq = kzalloc_obj(*ureq, GFP_KERNEL);
+ ureq = kzalloc_obj(*ureq);
if (!ureq)
goto out_no_notify;
@@ -370,7 +370,7 @@ int qcomtee_user_param_to_object(struct qcomtee_object **object,
int err;
struct qcomtee_user_object *user_object __free(kfree) =
- kzalloc_obj(*user_object, GFP_KERNEL);
+ kzalloc_obj(*user_object);
if (!user_object)
return -ENOMEM;
diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c
index 29df8cd1efd2..3dafbdc8d2c2 100644
--- a/drivers/tee/tee_core.c
+++ b/drivers/tee/tee_core.c
@@ -51,7 +51,7 @@ struct tee_context *teedev_open(struct tee_device *teedev)
if (!tee_device_get(teedev))
return ERR_PTR(-EINVAL);
- ctx = kzalloc_obj(*ctx, GFP_KERNEL);
+ ctx = kzalloc_obj(*ctx);
if (!ctx) {
rc = -ENOMEM;
goto err;
@@ -844,7 +844,7 @@ static int tee_ioctl_supp_recv(struct tee_context *ctx,
if (size_add(sizeof(*uarg), TEE_IOCTL_PARAM_SIZE(num_params)) != buf.buf_len)
return -EINVAL;
- params = kzalloc_objs(struct tee_param, num_params, GFP_KERNEL);
+ params = kzalloc_objs(struct tee_param, num_params);
if (!params)
return -ENOMEM;
@@ -958,7 +958,7 @@ static int tee_ioctl_supp_send(struct tee_context *ctx,
if (size_add(sizeof(*uarg), TEE_IOCTL_PARAM_SIZE(num_params)) > buf.buf_len)
return -EINVAL;
- params = kzalloc_objs(struct tee_param, num_params, GFP_KERNEL);
+ params = kzalloc_objs(struct tee_param, num_params);
if (!params)
return -ENOMEM;
@@ -1052,7 +1052,7 @@ struct tee_device *tee_device_alloc(const struct tee_desc *teedesc,
!teedesc->ops->release)
return ERR_PTR(-EINVAL);
- teedev = kzalloc_obj(*teedev, GFP_KERNEL);
+ teedev = kzalloc_obj(*teedev);
if (!teedev) {
ret = ERR_PTR(-ENOMEM);
goto err;
diff --git a/drivers/tee/tee_heap.c b/drivers/tee/tee_heap.c
index 71e50d9573c7..007c00156520 100644
--- a/drivers/tee/tee_heap.c
+++ b/drivers/tee/tee_heap.c
@@ -94,7 +94,7 @@ static int tee_heap_attach(struct dma_buf *dmabuf,
struct tee_heap_attachment *a;
int ret;
- a = kzalloc_obj(*a, GFP_KERNEL);
+ a = kzalloc_obj(*a);
if (!a)
return -ENOMEM;
@@ -188,7 +188,7 @@ static struct dma_buf *tee_dma_heap_alloc(struct dma_heap *heap,
if (!teedev)
return ERR_PTR(-EINVAL);
- buf = kzalloc_obj(*buf, GFP_KERNEL);
+ buf = kzalloc_obj(*buf);
if (!buf) {
dmabuf = ERR_PTR(-ENOMEM);
goto err;
@@ -260,7 +260,7 @@ static int alloc_dma_heap(struct tee_device *teedev, enum tee_dma_heap_id id,
return -ENOMEM;
}
- h = kzalloc_obj(*h, GFP_KERNEL);
+ h = kzalloc_obj(*h);
if (!h)
return -ENOMEM;
h->id = id;
@@ -472,7 +472,7 @@ struct tee_protmem_pool *tee_protmem_static_pool_alloc(phys_addr_t paddr,
if (!pfn_valid(PHYS_PFN(paddr)))
return ERR_PTR(-EINVAL);
- stp = kzalloc_obj(*stp, GFP_KERNEL);
+ stp = kzalloc_obj(*stp);
if (!stp)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/tee/tee_shm.c b/drivers/tee/tee_shm.c
index 1ed278fc9e4a..6c5b9e352e5e 100644
--- a/drivers/tee/tee_shm.c
+++ b/drivers/tee/tee_shm.c
@@ -106,7 +106,7 @@ static struct tee_shm *shm_alloc_helper(struct tee_context *ctx, size_t size,
goto err_dev_put;
}
- shm = kzalloc_obj(*shm, GFP_KERNEL);
+ shm = kzalloc_obj(*shm);
if (!shm) {
ret = ERR_PTR(-ENOMEM);
goto err_dev_put;
@@ -214,7 +214,7 @@ struct tee_shm *tee_shm_register_fd(struct tee_context *ctx, int fd)
teedev_ctx_get(ctx);
- ref = kzalloc_obj(*ref, GFP_KERNEL);
+ ref = kzalloc_obj(*ref);
if (!ref) {
rc = -ENOMEM;
goto err_put_tee;
@@ -315,7 +315,7 @@ struct tee_shm *tee_shm_alloc_dma_mem(struct tee_context *ctx,
if (!page)
goto err_put_teedev;
- dma_mem = kzalloc_obj(*dma_mem, GFP_KERNEL);
+ dma_mem = kzalloc_obj(*dma_mem);
if (!dma_mem)
goto err_free_pages;
@@ -373,7 +373,7 @@ int tee_dyn_shm_alloc_helper(struct tee_shm *shm, size_t size, size_t align,
shm->paddr = virt_to_phys(shm->kaddr);
shm->size = nr_pages * PAGE_SIZE;
- pages = kzalloc_objs(*pages, nr_pages, GFP_KERNEL);
+ pages = kzalloc_objs(*pages, nr_pages);
if (!pages) {
rc = -ENOMEM;
goto err_pages;
@@ -438,7 +438,7 @@ register_shm_helper(struct tee_context *ctx, struct iov_iter *iter, u32 flags,
teedev_ctx_get(ctx);
- shm = kzalloc_obj(*shm, GFP_KERNEL);
+ shm = kzalloc_obj(*shm);
if (!shm) {
ret = ERR_PTR(-ENOMEM);
goto err_ctx_put;
@@ -456,7 +456,7 @@ register_shm_helper(struct tee_context *ctx, struct iov_iter *iter, u32 flags,
goto err_ctx_put;
}
- shm->pages = kzalloc_objs(*shm->pages, num_pages, GFP_KERNEL);
+ shm->pages = kzalloc_objs(*shm->pages, num_pages);
if (!shm->pages) {
ret = ERR_PTR(-ENOMEM);
goto err_free_shm;
diff --git a/drivers/tee/tee_shm_pool.c b/drivers/tee/tee_shm_pool.c
index fc82c689c29e..1a2a7f47e30f 100644
--- a/drivers/tee/tee_shm_pool.c
+++ b/drivers/tee/tee_shm_pool.c
@@ -65,7 +65,7 @@ struct tee_shm_pool *tee_shm_pool_alloc_res_mem(unsigned long vaddr,
if (vaddr & page_mask || paddr & page_mask || size & page_mask)
return ERR_PTR(-EINVAL);
- pool = kzalloc_obj(*pool, GFP_KERNEL);
+ pool = kzalloc_obj(*pool);
if (!pool)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/tee/tstee/core.c b/drivers/tee/tstee/core.c
index 4a4aa2bc5ab6..79ae5d161638 100644
--- a/drivers/tee/tstee/core.c
+++ b/drivers/tee/tstee/core.c
@@ -59,7 +59,7 @@ static int tstee_open(struct tee_context *ctx)
{
struct ts_context_data *ctxdata;
- ctxdata = kzalloc_obj(*ctxdata, GFP_KERNEL);
+ ctxdata = kzalloc_obj(*ctxdata);
if (!ctxdata)
return -ENOMEM;
@@ -122,7 +122,7 @@ static int tstee_open_session(struct tee_context *ctx,
if (ffa_args[TS_RPC_SERVICE_INFO_IFACE] > U8_MAX)
return -EINVAL;
- sess = kzalloc_obj(*sess, GFP_KERNEL);
+ sess = kzalloc_obj(*sess);
if (!sess)
return -ENOMEM;
@@ -376,7 +376,7 @@ static const struct tee_shm_pool_ops pool_ops = {
static struct tee_shm_pool *tstee_create_shm_pool(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);
@@ -414,7 +414,7 @@ static int tstee_probe(struct ffa_device *ffa_dev)
if (!tstee_check_rpc_compatible(ffa_dev))
return -EINVAL;
- tstee = kzalloc_obj(*tstee, GFP_KERNEL);
+ tstee = kzalloc_obj(*tstee);
if (!tstee)
return -ENOMEM;