Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87950
b: refs/heads/master
c: 2b46278
h: refs/heads/master
v: v3
  • Loading branch information
Harvey Harrison authored and Dave Airlie committed Mar 29, 2008
1 parent 7e47054 commit cd04489
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 144a75fa1faa4a81530bded2e59872ef80d496b6
refs/heads/master: 2b46278b6af0a4df43016f01a0741d8e0a76bfd4
8 changes: 4 additions & 4 deletions trunk/drivers/char/drm/radeon_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static struct mem_block *alloc_block(struct mem_block *heap, int size,

list_for_each(p, heap) {
int start = (p->start + mask) & ~mask;
if (p->file_priv == 0 && start + size <= p->start + p->size)
if (p->file_priv == NULL && start + size <= p->start + p->size)
return split_block(p, start, size, file_priv);
}

Expand All @@ -113,15 +113,15 @@ static void free_block(struct mem_block *p)
/* Assumes a single contiguous range. Needs a special file_priv in
* 'heap' to stop it being subsumed.
*/
if (p->next->file_priv == 0) {
if (p->next->file_priv == NULL) {
struct mem_block *q = p->next;
p->size += q->size;
p->next = q->next;
p->next->prev = p;
drm_free(q, sizeof(*q), DRM_MEM_BUFS);
}

if (p->prev->file_priv == 0) {
if (p->prev->file_priv == NULL) {
struct mem_block *q = p->prev;
q->size += p->size;
q->next = p->next;
Expand Down Expand Up @@ -174,7 +174,7 @@ void radeon_mem_release(struct drm_file *file_priv, struct mem_block *heap)
* 'heap' to stop it being subsumed.
*/
list_for_each(p, heap) {
while (p->file_priv == 0 && p->next->file_priv == 0) {
while (p->file_priv == NULL && p->next->file_priv == NULL) {
struct mem_block *q = p->next;
p->size += q->size;
p->next = q->next;
Expand Down

0 comments on commit cd04489

Please sign in to comment.