]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers-convert-shrinkers-to-new-count-scan-api-fix-2
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 27 Jun 2013 23:52:20 +0000 (09:52 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:38:01 +0000 (16:38 +1000)
fix warnings

Cc: Dave Chinner <dchinner@redhat.com>
Cc: Glauber Costa <glommer@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c

index dc009f15af4270beaf635b5433a858f244b9cdfb..7957beeeaf733752e58c6b57f5d5a5a531113a09 100644 (file)
@@ -1000,7 +1000,7 @@ EXPORT_SYMBOL_GPL(ttm_dma_unpopulate);
  * I'm getting sadder as I hear more pathetical whimpers about needing per-pool
  * shrinkers
  */
-static long
+static unsigned long
 ttm_dma_pool_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
 {
        static atomic_t start_pool = ATOMIC_INIT(0);
@@ -1008,7 +1008,7 @@ ttm_dma_pool_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
        unsigned pool_offset = atomic_add_return(1, &start_pool);
        unsigned shrink_pages = sc->nr_to_scan;
        struct device_pools *p;
-       long freed = 0;
+       unsigned long freed = 0;
 
        if (list_empty(&_manager->pools))
                return SHRINK_STOP;
@@ -1037,11 +1037,11 @@ ttm_dma_pool_shrink_scan(struct shrinker *shrink, struct shrink_control *sc)
        return freed;
 }
 
-static long
+static unsigned long
 ttm_dma_pool_shrink_count(struct shrinker *shrink, struct shrink_control *sc)
 {
        struct device_pools *p;
-       long count = 0;
+       unsigned long count = 0;
 
        mutex_lock(&_manager->lock);
        list_for_each_entry(p, &_manager->pools, pools)
@@ -1052,7 +1052,7 @@ ttm_dma_pool_shrink_count(struct shrinker *shrink, struct shrink_control *sc)
 
 static void ttm_dma_pool_mm_shrink_init(struct ttm_pool_manager *manager)
 {
-       manager->mm_shrink.count_objects = &ttm_dma_pool_shrink_count;
+       manager->mm_shrink.count_objects = ttm_dma_pool_shrink_count;
        manager->mm_shrink.scan_objects = &ttm_dma_pool_shrink_scan;
        manager->mm_shrink.seeks = 1;
        register_shrinker(&manager->mm_shrink);