drm/ttm: remove dead codes
authorHuang Rui <ray.huang@amd.com>
Wed, 15 Aug 2018 07:39:33 +0000 (15:39 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Aug 2018 16:11:02 +0000 (11:11 -0500)
These codes are not used.

Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/ttm/ttm_bo_util.c
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c

index 046a6dda690a268df98159e5a8014b6826a739c9..ba80150d10524802271be2ce89f9144c0a98bee2 100644 (file)
@@ -629,10 +629,7 @@ int ttm_bo_kmap(struct ttm_buffer_object *bo,
                return -EINVAL;
        if (start_page > bo->num_pages)
                return -EINVAL;
-#if 0
-       if (num_pages > 1 && !capable(CAP_SYS_ADMIN))
-               return -EPERM;
-#endif
+
        (void) ttm_mem_io_lock(man, false);
        ret = ttm_mem_io_reserve(bo->bdev, &bo->mem);
        ttm_mem_io_unlock(man);
index 507be7ac11655235fe83e50404f5470a01a385a6..d594f7520b7b0c8f8609ffefbd374009995d3b2a 100644 (file)
@@ -410,13 +410,7 @@ static unsigned ttm_dma_page_pool_free(struct dma_pool *pool, unsigned nr_free,
 
        if (NUM_PAGES_TO_ALLOC < nr_free)
                npages_to_free = NUM_PAGES_TO_ALLOC;
-#if 0
-       if (nr_free > 1) {
-               pr_debug("%s: (%s:%d) Attempting to free %d (%d) pages\n",
-                        pool->dev_name, pool->name, current->pid,
-                        npages_to_free, nr_free);
-       }
-#endif
+
        if (use_static)
                pages_to_free = static_buf;
        else