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
@@ -2504,7 +2504,7 @@ static void *i915_gem_object_map(const struct drm_i915_gem_object *obj,
|
||||
|
||||
if (n_pages > ARRAY_SIZE(stack_pages)) {
|
||||
/* Too big for stack -- allocate temporary array instead */
|
||||
pages = drm_malloc_gfp(n_pages, sizeof(*pages), GFP_TEMPORARY);
|
||||
pages = kvmalloc_array(n_pages, sizeof(*pages), GFP_TEMPORARY);
|
||||
if (!pages)
|
||||
return NULL;
|
||||
}
|
||||
@@ -2526,7 +2526,7 @@ static void *i915_gem_object_map(const struct drm_i915_gem_object *obj,
|
||||
addr = vmap(pages, n_pages, 0, pgprot);
|
||||
|
||||
if (pages != stack_pages)
|
||||
drm_free_large(pages);
|
||||
kvfree(pages);
|
||||
|
||||
return addr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user