summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
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/amd/amdgpu/amdgpu_vm.c
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/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index d946c39c4acb..f2beb980e3c3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1118,7 +1118,7 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, struct amdgpu_vm *vm,
if (!drm_dev_enter(adev_to_drm(adev), &idx))
return -ENODEV;
- tlb_cb = kmalloc_obj(*tlb_cb, GFP_KERNEL);
+ tlb_cb = kmalloc_obj(*tlb_cb);
if (!tlb_cb) {
drm_dev_exit(idx);
return -ENOMEM;
@@ -1471,7 +1471,7 @@ static void amdgpu_vm_add_prt_cb(struct amdgpu_device *adev,
if (!adev->gmc.gmc_funcs->set_prt)
return;
- cb = kmalloc_obj(struct amdgpu_prt_cb, GFP_KERNEL);
+ cb = kmalloc_obj(struct amdgpu_prt_cb);
if (!cb) {
/* Last resort when we are OOM */
if (fence)
@@ -1737,7 +1737,7 @@ struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,
amdgpu_vm_assert_locked(vm);
- bo_va = kzalloc_obj(struct amdgpu_bo_va, GFP_KERNEL);
+ bo_va = kzalloc_obj(struct amdgpu_bo_va);
if (bo_va == NULL) {
return NULL;
}
@@ -1866,7 +1866,7 @@ int amdgpu_vm_bo_map(struct amdgpu_device *adev,
return -EINVAL;
}
- mapping = kmalloc_obj(*mapping, GFP_KERNEL);
+ mapping = kmalloc_obj(*mapping);
if (!mapping)
return -ENOMEM;
@@ -1913,7 +1913,7 @@ int amdgpu_vm_bo_replace_map(struct amdgpu_device *adev,
return r;
/* Allocate all the needed memory */
- mapping = kmalloc_obj(*mapping, GFP_KERNEL);
+ mapping = kmalloc_obj(*mapping);
if (!mapping)
return -ENOMEM;
@@ -2033,12 +2033,12 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
eaddr = saddr + (size - 1) / AMDGPU_GPU_PAGE_SIZE;
/* Allocate all the needed memory */
- before = kzalloc_obj(*before, GFP_KERNEL);
+ before = kzalloc_obj(*before);
if (!before)
return -ENOMEM;
INIT_LIST_HEAD(&before->list);
- after = kzalloc_obj(*after, GFP_KERNEL);
+ after = kzalloc_obj(*after);
if (!after) {
kfree(before);
return -ENOMEM;
@@ -2533,7 +2533,7 @@ amdgpu_vm_get_task_info_pasid(struct amdgpu_device *adev, u32 pasid)
static int amdgpu_vm_create_task_info(struct amdgpu_vm *vm)
{
- vm->task_info = kzalloc_obj(struct amdgpu_task_info, GFP_KERNEL);
+ vm->task_info = kzalloc_obj(struct amdgpu_task_info);
if (!vm->task_info)
return -ENOMEM;