drm: drop drm_[cm]alloc* helpers
Now that drm_[cm]alloc* helpers are simple one line wrappers around kvmalloc_array and drm_free_large is just kvfree alias we can drop them and replace by their native forms. This shouldn't introduce any functional change. Changes since v1 - fix typo in drivers/gpu//drm/etnaviv/etnaviv_gem.c - noticed by 0day build robot Suggested-by: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Michal Hocko <mhocko@suse.com>drm: drop drm_[cm]alloc* helpers [danvet: Fixup vgem which grew another user very recently.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Christian König <christian.koenig@amd.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170517122312.GK18247@dhcp22.suse.cz
This commit is contained in:
committed by
Daniel Vetter
parent
c4f51dc872
commit
2098105ec6
@@ -279,8 +279,9 @@ static int amdgpu_vm_alloc_levels(struct amdgpu_device *adev,
|
||||
if (!parent->entries) {
|
||||
unsigned num_entries = amdgpu_vm_num_entries(adev, level);
|
||||
|
||||
parent->entries = drm_calloc_large(num_entries,
|
||||
sizeof(struct amdgpu_vm_pt));
|
||||
parent->entries = kvmalloc_array(num_entries,
|
||||
sizeof(struct amdgpu_vm_pt),
|
||||
GFP_KERNEL | __GFP_ZERO);
|
||||
if (!parent->entries)
|
||||
return -ENOMEM;
|
||||
memset(parent->entries, 0 , sizeof(struct amdgpu_vm_pt));
|
||||
@@ -2198,7 +2199,7 @@ static void amdgpu_vm_free_levels(struct amdgpu_vm_pt *level)
|
||||
for (i = 0; i <= level->last_entry_used; i++)
|
||||
amdgpu_vm_free_levels(&level->entries[i]);
|
||||
|
||||
drm_free_large(level->entries);
|
||||
kvfree(level->entries);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user