[PATCH 06/14] drm: Use kvfree() in drm_free_large()

From: Pekka Enberg
Date: Fri May 15 2015 - 14:35:56 EST


Use kvfree() instead of open-coding it.

Cc: David Airlie <airlied@xxxxxxxx>
Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/