Skip to contentSkip to conversation

drm/amdgpu: use kvcalloc for entry->entries.

PATCH New huqiqiao 1 participant 1 message Jun 25, 2021

Subsystems (2)
lore
Share & tools
lore

huqiqiao

author
#0 lore raw

PATCH 1/1 drm/amdgpu: use kvcalloc for entry->entries.

kmalloc_array + __GFP_ZERO is the same with kvcalloc.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +1 -2
index 9acee4a5b2ba..5a012321d09e 100644
@@ -909,8 +909,7 @@ static int amdgpu_vm_alloc_pts(struct amdgpu_device *adev,
 
 		num_entries = amdgpu_vm_num_entries(adev, cursor->level);
 		entry->entries = kvmalloc_array(num_entries,
-						sizeof(*entry->entries),
-						GFP_KERNEL | __GFP_ZERO);
+			sizeof(*entry->entries), GFP_KERNEL);
 		if (!entry->entries)
 			return -ENOMEM;
 	}
Signature · 1 line
2.11.0