Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282744
b: refs/heads/master
c: 7920aa5
h: refs/heads/master
v: v3
  • Loading branch information
Dan Carpenter authored and Dave Airlie committed Jan 10, 2012
1 parent 2e17098 commit bb19faa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 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: a7eef882a8d37be46459faa5020648af7ccf6ad2
refs/heads/master: 7920aa5a9d841fc7a10ff53a5a775f821d7a6ba1
8 changes: 3 additions & 5 deletions trunk/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,10 +933,8 @@ static int ttm_dma_pool_get_num_unused_pages(void)
unsigned total = 0;

mutex_lock(&_manager->lock);
list_for_each_entry(p, &_manager->pools, pools) {
if (p)
total += p->pool->npages_free;
}
list_for_each_entry(p, &_manager->pools, pools)
total += p->pool->npages_free;
mutex_unlock(&_manager->lock);
return total;
}
Expand Down Expand Up @@ -1031,7 +1029,7 @@ static int ttm_dma_pool_mm_shrink(struct shrinker *shrink,
list_for_each_entry(p, &_manager->pools, pools) {
unsigned nr_free;

if (!p && !p->dev)
if (!p->dev)
continue;
if (shrink_pages == 0)
break;
Expand Down

0 comments on commit bb19faa

Please sign in to comment.