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/gpu/drm/tests | |
| 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/gpu/drm/tests')
| -rw-r--r-- | drivers/gpu/drm/tests/drm_gem_shmem_test.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/tests/drm_mm_test.c | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/tests/drm_panic_test.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/tests/drm_gem_shmem_test.c b/drivers/gpu/drm/tests/drm_gem_shmem_test.c index f401b9c42a9c..44a190109249 100644 --- a/drivers/gpu/drm/tests/drm_gem_shmem_test.c +++ b/drivers/gpu/drm/tests/drm_gem_shmem_test.c @@ -80,7 +80,7 @@ static void drm_gem_shmem_test_obj_create_private(struct kunit *test) buf = kunit_kzalloc(test, TEST_SIZE, GFP_KERNEL); KUNIT_ASSERT_NOT_NULL(test, buf); - sgt = kzalloc_obj(*sgt, GFP_KERNEL); + sgt = kzalloc_obj(*sgt); KUNIT_ASSERT_NOT_NULL(test, sgt); ret = kunit_add_action_or_reset(test, kfree_wrapper, sgt); diff --git a/drivers/gpu/drm/tests/drm_mm_test.c b/drivers/gpu/drm/tests/drm_mm_test.c index 6a1a27ee5f36..f4f473f87838 100644 --- a/drivers/gpu/drm/tests/drm_mm_test.c +++ b/drivers/gpu/drm/tests/drm_mm_test.c @@ -252,7 +252,7 @@ static void drm_test_mm_align_pot(struct kunit *test, int max) for (bit = max - 1; bit; bit--) { u64 align, size; - node = kzalloc_obj(*node, GFP_KERNEL); + node = kzalloc_obj(*node); if (!node) { KUNIT_FAIL(test, "failed to allocate node"); goto out; diff --git a/drivers/gpu/drm/tests/drm_panic_test.c b/drivers/gpu/drm/tests/drm_panic_test.c index a36f5106c139..ad2f3a2f93b6 100644 --- a/drivers/gpu/drm/tests/drm_panic_test.c +++ b/drivers/gpu/drm/tests/drm_panic_test.c @@ -127,7 +127,7 @@ static void drm_test_panic_screen_user_page(struct kunit *test) fb_size = params->width * params->height * sb->format->cpp[0]; npages = DIV_ROUND_UP(fb_size, PAGE_SIZE); - pages = kmalloc_objs(struct page *, npages, GFP_KERNEL); + pages = kmalloc_objs(struct page *, npages); KUNIT_ASSERT_NOT_NULL(test, pages); for (p = 0; p < npages; p++) { |
