From 7809efc8c32520e6b25c143ee3276edbf534ed14 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 30 Aug 2004 09:01:50 +0000 Subject: drm-memory patch, cleans up alloc/free and makes calloc look more libc like --- linux/drm_memory.h | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'linux/drm_memory.h') diff --git a/linux/drm_memory.h b/linux/drm_memory.h index fe8141c9..669bef08 100644 --- a/linux/drm_memory.h +++ b/linux/drm_memory.h @@ -39,10 +39,8 @@ /** * Cut down version of drm_memory_debug.h, which used to be called - * drm_memory.h. If you want the debug functionality, change 0 to 1 - * below. + * drm_memory.h. */ -#define DEBUG_MEMORY 0 /* Need the 4-argument version of vmap(). */ #if __OS_HAS_AGP && defined(VMAP_4_ARGS) @@ -199,7 +197,7 @@ static inline void drm_ioremapfree(void *pt, unsigned long size, drm_device_t *d } -#if DEBUG_MEMORY +#ifdef DEBUG_MEMORY #include "drm_memory_debug.h" #else @@ -228,13 +226,7 @@ int DRM(mem_info)(char *buf, char **start, off_t offset, } /** Wrapper around kmalloc() */ -void *DRM(alloc)(size_t size, int area) -{ - return kmalloc(size, GFP_KERNEL); -} - -/** Wrapper around kmalloc() */ -void *DRM(calloc)(size_t size, size_t nmemb, int area) +void *DRM(calloc)(size_t nmemb, size_t size, int area) { void *addr; @@ -258,12 +250,6 @@ void *DRM(realloc)(void *oldpt, size_t oldsize, size_t size, int area) return pt; } -/** Wrapper around kfree() */ -void DRM(free)(void *pt, size_t size, int area) -{ - kfree(pt); -} - /** * Allocate pages. * -- cgit v1.2.3