summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gem
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/gpu/drm/i915/gem
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
downloadlinux-next-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz
linux-next-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.zip
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/gpu/drm/i915/gem')
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_clflush.c2
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_context.c10
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c2
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c4
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_internal.c2
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_mman.c2
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.c2
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_pages.c4
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_phys.c2
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_stolen.c6
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_ttm.c2
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c2
-rw-r--r--drivers/gpu/drm/i915/gem/i915_gem_userptr.c4
-rw-r--r--drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c2
-rw-r--r--drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c6
-rw-r--r--drivers/gpu/drm/i915/gem/selftests/mock_context.c2
-rw-r--r--drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c2
17 files changed, 28 insertions, 28 deletions
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_clflush.c b/drivers/gpu/drm/i915/gem/i915_gem_clflush.c
index 50ade188edc5..30cc08583cbd 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_clflush.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_clflush.c
@@ -52,7 +52,7 @@ static struct clflush *clflush_work_create(struct drm_i915_gem_object *obj)
GEM_BUG_ON(!obj->cache_dirty);
- clflush = kmalloc_obj(*clflush, GFP_KERNEL);
+ clflush = kmalloc_obj(*clflush);
if (!clflush)
return NULL;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
index c364423706c6..6ff5dc07b719 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
@@ -285,7 +285,7 @@ proto_context_create(struct drm_i915_file_private *fpriv,
{
struct i915_gem_proto_context *pc, *err;
- pc = kzalloc_obj(*pc, GFP_KERNEL);
+ pc = kzalloc_obj(*pc);
if (!pc)
return ERR_PTR(-ENOMEM);
@@ -442,7 +442,7 @@ set_proto_ctx_engines_balance(struct i915_user_extension __user *base,
if (num_siblings == 0)
return 0;
- siblings = kmalloc_objs(*siblings, num_siblings, GFP_KERNEL);
+ siblings = kmalloc_objs(*siblings, num_siblings);
if (!siblings)
return -ENOMEM;
@@ -644,7 +644,7 @@ set_proto_ctx_engines_parallel_submit(struct i915_user_extension __user *base,
return -EINVAL;
}
- siblings = kmalloc_objs(*siblings, num_siblings * width, GFP_KERNEL);
+ siblings = kmalloc_objs(*siblings, num_siblings * width);
if (!siblings)
return -ENOMEM;
@@ -759,7 +759,7 @@ static int set_proto_ctx_engines(struct drm_i915_file_private *fpriv,
if (set.num_engines > I915_EXEC_RING_MASK + 1)
return -EINVAL;
- set.engines = kmalloc_objs(*set.engines, set.num_engines, GFP_KERNEL);
+ set.engines = kmalloc_objs(*set.engines, set.num_engines);
if (!set.engines)
return -ENOMEM;
@@ -1609,7 +1609,7 @@ i915_gem_create_context(struct drm_i915_private *i915,
int err;
int i;
- ctx = kzalloc_obj(*ctx, GFP_KERNEL);
+ ctx = kzalloc_obj(*ctx);
if (!ctx)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
index db7166784731..b43d34c7d641 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
@@ -36,7 +36,7 @@ static struct sg_table *i915_gem_map_dma_buf(struct dma_buf_attachment *attach,
* Make a copy of the object's sgt, so that we can make an independent
* mapping
*/
- sgt = kmalloc_obj(*sgt, GFP_KERNEL);
+ sgt = kmalloc_obj(*sgt);
if (!sgt) {
ret = -ENOMEM;
goto err;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
index c2e91eeb7c16..e7918f896a26 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -2006,7 +2006,7 @@ static int eb_capture_stage(struct i915_execbuffer *eb)
for_each_batch_create_order(eb, j) {
struct i915_capture_list *capture;
- capture = kmalloc_obj(*capture, GFP_KERNEL);
+ capture = kmalloc_obj(*capture);
if (!capture)
continue;
@@ -3190,7 +3190,7 @@ eb_composite_fence_create(struct i915_execbuffer *eb, int out_fence_fd)
GEM_BUG_ON(!intel_context_is_parent(eb->context));
- fences = kmalloc_objs(*fences, eb->num_batches, GFP_KERNEL);
+ fences = kmalloc_objs(*fences, eb->num_batches);
if (!fences)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_internal.c b/drivers/gpu/drm/i915/gem/i915_gem_internal.c
index e90fe30cc44e..37d286ecb99b 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_internal.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_internal.c
@@ -54,7 +54,7 @@ static int i915_gem_object_get_pages_internal(struct drm_i915_gem_object *obj)
}
create_st:
- st = kmalloc_obj(*st, GFP_KERNEL);
+ st = kmalloc_obj(*st);
if (!st)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index e10a9e21e6c8..0644f85c6c8e 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -730,7 +730,7 @@ mmap_offset_attach(struct drm_i915_gem_object *obj,
if (mmo)
goto out;
- mmo = kmalloc_obj(*mmo, GFP_KERNEL);
+ mmo = kmalloc_obj(*mmo);
if (!mmo)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.c
index e9b7d76927bb..adba3fa96c05 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.c
@@ -32,7 +32,7 @@ i915_gem_object_frontbuffer_get(struct drm_i915_gem_object *obj)
if (front)
return front;
- front = kmalloc_obj(*front, GFP_KERNEL);
+ front = kmalloc_obj(*front);
if (!front)
return NULL;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pages.c b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
index fa6d174987ac..df35bdb755e4 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_pages.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_pages.c
@@ -314,7 +314,7 @@ static void *i915_gem_object_map_page(struct drm_i915_gem_object *obj,
if (n_pages > ARRAY_SIZE(stack)) {
/* Too big for stack -- allocate temporary array instead */
- pages = kvmalloc_objs(*pages, n_pages, GFP_KERNEL);
+ pages = kvmalloc_objs(*pages, n_pages);
if (!pages)
return ERR_PTR(-ENOMEM);
}
@@ -437,7 +437,7 @@ struct intel_panic *i915_gem_object_alloc_panic(void)
{
struct intel_panic *panic;
- panic = kzalloc_obj(*panic, GFP_KERNEL);
+ panic = kzalloc_obj(*panic);
return panic;
}
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_phys.c b/drivers/gpu/drm/i915/gem/i915_gem_phys.c
index 71a2c2bb5087..ce2780ef97ef 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_phys.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_phys.c
@@ -47,7 +47,7 @@ static int i915_gem_object_get_pages_phys(struct drm_i915_gem_object *obj)
if (!vaddr)
return -ENOMEM;
- st = kmalloc_obj(*st, GFP_KERNEL);
+ st = kmalloc_obj(*st);
if (!st)
goto err_pci;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
index a577f8df7c60..77f85359f279 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c
@@ -648,7 +648,7 @@ i915_pages_create_for_stolen(struct drm_device *dev,
* dma mapping in a single scatterlist.
*/
- st = kmalloc_obj(*st, GFP_KERNEL);
+ st = kmalloc_obj(*st);
if (st == NULL)
return ERR_PTR(-ENOMEM);
@@ -783,7 +783,7 @@ static int _i915_gem_object_stolen_init(struct intel_memory_region *mem,
!(flags & I915_BO_ALLOC_GPU_ONLY))
return -ENOSPC;
- stolen = kzalloc_obj(*stolen, GFP_KERNEL);
+ stolen = kzalloc_obj(*stolen);
if (!stolen)
return -ENOMEM;
@@ -1074,7 +1074,7 @@ static struct intel_stolen_node *i915_gem_stolen_node_alloc(struct drm_device *d
struct drm_i915_private *i915 = to_i915(drm);
struct intel_stolen_node *node;
- node = kzalloc_obj(*node, GFP_KERNEL);
+ node = kzalloc_obj(*node);
if (!node)
return NULL;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
index 46ed4ff8658d..033eda38e4b5 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c
@@ -279,7 +279,7 @@ static struct ttm_tt *i915_ttm_tt_create(struct ttm_buffer_object *bo,
if (i915_ttm_is_ghost_object(bo))
return NULL;
- i915_tt = kzalloc_obj(*i915_tt, GFP_KERNEL);
+ i915_tt = kzalloc_obj(*i915_tt);
if (!i915_tt)
return NULL;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
index ff2e02113fe6..3a7e202ae87d 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
@@ -498,7 +498,7 @@ __i915_ttm_move(struct ttm_buffer_object *bo,
struct dma_fence *dep = fence;
if (!I915_SELFTEST_ONLY(fail_work_allocation))
- copy_work = kzalloc_obj(*copy_work, GFP_KERNEL);
+ copy_work = kzalloc_obj(*copy_work);
if (copy_work) {
copy_work->i915 = i915;
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
index 6518a02397c6..043095f93ac6 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_userptr.c
@@ -109,7 +109,7 @@ static int i915_gem_userptr_get_pages(struct drm_i915_gem_object *obj)
return -E2BIG;
num_pages = obj->base.size >> PAGE_SHIFT;
- st = kmalloc_obj(*st, GFP_KERNEL);
+ st = kmalloc_obj(*st);
if (!st)
return -ENOMEM;
@@ -258,7 +258,7 @@ int i915_gem_object_userptr_submit_init(struct drm_i915_gem_object *obj)
if (ret)
return ret;
- pvec = kvmalloc_objs(struct page *, num_pages, GFP_KERNEL);
+ pvec = kvmalloc_objs(struct page *, num_pages);
if (!pvec)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c
index ee661b7d3c6f..1d4d7cfb3f9c 100644
--- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c
+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c
@@ -540,7 +540,7 @@ tiled_blits_create(struct intel_engine_cs *engine, struct rnd_state *prng)
u64 hole_size;
int err;
- t = kzalloc_obj(*t, GFP_KERNEL);
+ t = kzalloc_obj(*t);
if (!t)
return ERR_PTR(-ENOMEM);
diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
index 223a9ca32d22..9d405098f9e7 100644
--- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
@@ -56,7 +56,7 @@ static int live_nop_switch(void *arg)
if (IS_ERR(file))
return PTR_ERR(file);
- ctx = kzalloc_objs(*ctx, nctx, GFP_KERNEL);
+ ctx = kzalloc_objs(*ctx, nctx);
if (!ctx) {
err = -ENOMEM;
goto out_file;
@@ -317,7 +317,7 @@ static int live_parallel_switch(void *arg)
engines = i915_gem_context_lock_engines(ctx);
count = engines->num_engines;
- data = kzalloc_objs(*data, count, GFP_KERNEL);
+ data = kzalloc_objs(*data, count);
if (!data) {
i915_gem_context_unlock_engines(ctx);
err = -ENOMEM;
@@ -1054,7 +1054,7 @@ __sseu_prepare(const char *name,
if (!(flags & (TEST_BUSY | TEST_RESET)))
return 0;
- *spin = kzalloc_obj(**spin, GFP_KERNEL);
+ *spin = kzalloc_obj(**spin);
if (!*spin)
return -ENOMEM;
diff --git a/drivers/gpu/drm/i915/gem/selftests/mock_context.c b/drivers/gpu/drm/i915/gem/selftests/mock_context.c
index 35cf3d0dd08f..24f1437262ec 100644
--- a/drivers/gpu/drm/i915/gem/selftests/mock_context.c
+++ b/drivers/gpu/drm/i915/gem/selftests/mock_context.c
@@ -17,7 +17,7 @@ mock_context(struct drm_i915_private *i915,
struct i915_gem_engines *e;
struct intel_sseu null_sseu = {};
- ctx = kzalloc_obj(*ctx, GFP_KERNEL);
+ ctx = kzalloc_obj(*ctx);
if (!ctx)
return NULL;
diff --git a/drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c b/drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c
index 8eabb6aa2f65..4212873c326d 100644
--- a/drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c
+++ b/drivers/gpu/drm/i915/gem/selftests/mock_dmabuf.c
@@ -15,7 +15,7 @@ static struct sg_table *mock_map_dma_buf(struct dma_buf_attachment *attachment,
struct scatterlist *sg;
int i, err;
- st = kmalloc_obj(*st, GFP_KERNEL);
+ st = kmalloc_obj(*st);
if (!st)
return ERR_PTR(-ENOMEM);