summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
authorJon Smirl <jonsmirl@yahoo.com>2004-10-02 19:11:30 +0000
committerJon Smirl <jonsmirl@yahoo.com>2004-10-02 19:11:30 +0000
commitaba12cfc0e80694457347dc9d0ed78cd78192ea3 (patch)
tree0551361347f83a9d8d6418d38633a091ed8a8bd8 /shared-core
parente17abf5d5dc7c9895ed9aea0efb4ac501171fa54 (diff)
janitor-list_for_each-drivers-char-drm-radeon_memc.patch from mm kernel
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/radeon_mem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/shared-core/radeon_mem.c b/shared-core/radeon_mem.c
index 7cecd7ee..01048a5a 100644
--- a/shared-core/radeon_mem.c
+++ b/shared-core/radeon_mem.c
@@ -86,7 +86,7 @@ static struct mem_block *alloc_block(struct mem_block *heap, int size,
struct mem_block *p;
int mask = (1 << align2) - 1;
- for (p = heap->next; p != heap; p = p->next) {
+ list_for_each(p, heap) {
int start = (p->start + mask) & ~mask;
if (p->filp == 0 && start + size <= p->start + p->size)
return split_block(p, start, size, filp);
@@ -99,7 +99,7 @@ static struct mem_block *find_block(struct mem_block *heap, int start)
{
struct mem_block *p;
- for (p = heap->next; p != heap; p = p->next)
+ list_for_each(p, heap)
if (p->start == start)
return p;
@@ -165,7 +165,7 @@ void radeon_mem_release(DRMFILE filp, struct mem_block *heap)
if (!heap || !heap->next)
return;
- for (p = heap->next; p != heap; p = p->next) {
+ list_for_each(p, heap) {
if (p->filp == filp)
p->filp = NULL;
}
@@ -173,7 +173,7 @@ void radeon_mem_release(DRMFILE filp, struct mem_block *heap)
/* Assumes a single contiguous range. Needs a special filp in
* 'heap' to stop it being subsumed.
*/
- for (p = heap->next; p != heap; p = p->next) {
+ list_for_each(p, heap) {
while (p->filp == 0 && p->next->filp == 0) {
struct mem_block *q = p->next;
p->size += q->size;