lkml.org 
[lkml]   [2015]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 06/14] drm: Use kvfree() in drm_free_large()
Date
Use kvfree() instead of open-coding it.

Cc: David Airlie <airlied@linux.ie>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
include/drm/drm_mem_util.h | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/include/drm/drm_mem_util.h b/include/drm/drm_mem_util.h
index 19a2404..e42495a 100644
--- a/include/drm/drm_mem_util.h
+++ b/include/drm/drm_mem_util.h
@@ -56,10 +56,7 @@ static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size)

static __inline void drm_free_large(void *ptr)
{
- if (!is_vmalloc_addr(ptr))
- return kfree(ptr);
-
- vfree(ptr);
+ kvfree(ptr);
}

#endif
--
2.1.0


\
 
 \ /
  Last update: 2015-05-15 20:41    [W:0.109 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site