summaryrefslogtreecommitdiff
path: root/shared-core/radeon_mem.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2004-07-15 13:03:55 +0000
committerDave Airlie <airlied@linux.ie>2004-07-15 13:03:55 +0000
commit8efddd01e8a2254b4ed00dff0d55827b6f2b35ce (patch)
treea52af2302e3b2c803c7f46bed2567d16d074ebd9 /shared-core/radeon_mem.c
parentbb5112b616080033ab9f09092098527f2aa09b70 (diff)
sparse cleanups from kernel: Al Viro
Diffstat (limited to 'shared-core/radeon_mem.c')
-rw-r--r--shared-core/radeon_mem.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/shared-core/radeon_mem.c b/shared-core/radeon_mem.c
index 83e2f6c0..96b76ae0 100644
--- a/shared-core/radeon_mem.c
+++ b/shared-core/radeon_mem.c
@@ -49,7 +49,7 @@ static struct mem_block *split_block(struct mem_block *p, int start, int size,
goto out;
newblock->start = start;
newblock->size = p->size - (start - p->start);
- newblock->filp = 0;
+ newblock->filp = NULL;
newblock->next = p->next;
newblock->prev = p;
p->next->prev = newblock;
@@ -65,7 +65,7 @@ static struct mem_block *split_block(struct mem_block *p, int start, int size,
goto out;
newblock->start = start + size;
newblock->size = p->size - size;
- newblock->filp = 0;
+ newblock->filp = NULL;
newblock->next = p->next;
newblock->prev = p;
p->next->prev = newblock;
@@ -108,7 +108,7 @@ static struct mem_block *find_block( struct mem_block *heap, int start )
static void free_block( struct mem_block *p )
{
- p->filp = 0;
+ p->filp = NULL;
/* Assumes a single contiguous range. Needs a special filp in
* 'heap' to stop it being subsumed.
@@ -147,7 +147,7 @@ static int init_heap(struct mem_block **heap, int start, int size)
blocks->start = start;
blocks->size = size;
- blocks->filp = 0;
+ blocks->filp = NULL;
blocks->next = blocks->prev = *heap;
memset( *heap, 0, sizeof(**heap) );
@@ -168,7 +168,7 @@ void radeon_mem_release( DRMFILE filp, struct mem_block *heap )
for (p = heap->next ; p != heap ; p = p->next) {
if (p->filp == filp)
- p->filp = 0;
+ p->filp = NULL;
}
/* Assumes a single contiguous range. Needs a special filp in
@@ -201,7 +201,7 @@ void radeon_mem_takedown( struct mem_block **heap )
}
DRM_FREE( *heap, sizeof(**heap) );
- *heap = 0;
+ *heap = NULL;
}
@@ -217,7 +217,7 @@ static struct mem_block **get_heap( drm_radeon_private_t *dev_priv,
case RADEON_MEM_REGION_FB:
return &dev_priv->fb_heap;
default:
- return 0;
+ return NULL;
}
}