summaryrefslogtreecommitdiff
path: root/drivers/tee/amdtee
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/amdtee
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/amdtee')
-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
3 files changed, 8 insertions, 8 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);