diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-03-28 17:23:06 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2008-03-29 17:56:39 -0400 |
commit | 2b46278b6af0a4df43016f01a0741d8e0a76bfd4 (patch) | |
tree | d45df1059d28fff78307fafeed8e8cf2b45cdf26 /drivers/char | |
parent | 144a75fa1faa4a81530bded2e59872ef80d496b6 (diff) |
drm: radeon: fix sparse integer as NULL pointer warnings in radeon_mem.c
drivers/char/drm/radeon_mem.c:91:23: warning: Using plain integer as NULL pointer
drivers/char/drm/radeon_mem.c:116:28: warning: Using plain integer as NULL pointer
drivers/char/drm/radeon_mem.c:124:28: warning: Using plain integer as NULL pointer
drivers/char/drm/radeon_mem.c:177:26: warning: Using plain integer as NULL pointer
drivers/char/drm/radeon_mem.c:177:53: warning: Using plain integer as NULL pointer
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/drm/radeon_mem.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/drm/radeon_mem.c b/drivers/char/drm/radeon_mem.c index 78b34fa7c89a..4af5286a36fb 100644 --- a/drivers/char/drm/radeon_mem.c +++ b/drivers/char/drm/radeon_mem.c | |||
@@ -88,7 +88,7 @@ static struct mem_block *alloc_block(struct mem_block *heap, int size, | |||
88 | 88 | ||
89 | list_for_each(p, heap) { | 89 | list_for_each(p, heap) { |
90 | int start = (p->start + mask) & ~mask; | 90 | int start = (p->start + mask) & ~mask; |
91 | if (p->file_priv == 0 && start + size <= p->start + p->size) | 91 | if (p->file_priv == NULL && start + size <= p->start + p->size) |
92 | return split_block(p, start, size, file_priv); | 92 | return split_block(p, start, size, file_priv); |
93 | } | 93 | } |
94 | 94 | ||
@@ -113,7 +113,7 @@ static void free_block(struct mem_block *p) | |||
113 | /* Assumes a single contiguous range. Needs a special file_priv in | 113 | /* Assumes a single contiguous range. Needs a special file_priv in |
114 | * 'heap' to stop it being subsumed. | 114 | * 'heap' to stop it being subsumed. |
115 | */ | 115 | */ |
116 | if (p->next->file_priv == 0) { | 116 | if (p->next->file_priv == NULL) { |
117 | struct mem_block *q = p->next; | 117 | struct mem_block *q = p->next; |
118 | p->size += q->size; | 118 | p->size += q->size; |
119 | p->next = q->next; | 119 | p->next = q->next; |
@@ -121,7 +121,7 @@ static void free_block(struct mem_block *p) | |||
121 | drm_free(q, sizeof(*q), DRM_MEM_BUFS); | 121 | drm_free(q, sizeof(*q), DRM_MEM_BUFS); |
122 | } | 122 | } |
123 | 123 | ||
124 | if (p->prev->file_priv == 0) { | 124 | if (p->prev->file_priv == NULL) { |
125 | struct mem_block *q = p->prev; | 125 | struct mem_block *q = p->prev; |
126 | q->size += p->size; | 126 | q->size += p->size; |
127 | q->next = p->next; | 127 | q->next = p->next; |
@@ -174,7 +174,7 @@ void radeon_mem_release(struct drm_file *file_priv, struct mem_block *heap) | |||
174 | * 'heap' to stop it being subsumed. | 174 | * 'heap' to stop it being subsumed. |
175 | */ | 175 | */ |
176 | list_for_each(p, heap) { | 176 | list_for_each(p, heap) { |
177 | while (p->file_priv == 0 && p->next->file_priv == 0) { | 177 | while (p->file_priv == NULL && p->next->file_priv == NULL) { |
178 | struct mem_block *q = p->next; | 178 | struct mem_block *q = p->next; |
179 | p->size += q->size; | 179 | p->size += q->size; |
180 | p->next = q->next; | 180 | p->next = q->next; |