drm/ttm: remove set but not used variable 'rdev'
authorYueHaibing <yuehaibing@huawei.com>
Wed, 20 Mar 2019 12:59:39 +0000 (12:59 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 21 Mar 2019 04:39:49 +0000 (23:39 -0500)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/radeon/radeon_ttm.c: In function 'radeon_move_vram_ram':
drivers/gpu/drm/radeon/radeon_ttm.c:254:24: warning:
 variable 'rdev' set but not used [-Wunused-but-set-variable]

drivers/gpu/drm/radeon/radeon_ttm.c: In function 'radeon_move_ram_vram':
drivers/gpu/drm/radeon/radeon_ttm.c:301:24: warning:
 variable 'rdev' set but not used [-Wunused-but-set-variable]

It's not used since a987fcaa805f ("ttm: Make parts of a struct ttm_bo_device
global.")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_ttm.c

index 557bdd7a2fc88d967632993eeb586f90407711d2..5d42f8d8e68d4558cc9147d23b766f0dc0292216 100644 (file)
@@ -251,14 +251,12 @@ static int radeon_move_vram_ram(struct ttm_buffer_object *bo,
                                struct ttm_mem_reg *new_mem)
 {
        struct ttm_operation_ctx ctx = { interruptible, no_wait_gpu };
-       struct radeon_device *rdev;
        struct ttm_mem_reg *old_mem = &bo->mem;
        struct ttm_mem_reg tmp_mem;
        struct ttm_place placements;
        struct ttm_placement placement;
        int r;
 
-       rdev = radeon_get_rdev(bo->bdev);
        tmp_mem = *new_mem;
        tmp_mem.mm_node = NULL;
        placement.num_placement = 1;
@@ -298,14 +296,12 @@ static int radeon_move_ram_vram(struct ttm_buffer_object *bo,
                                struct ttm_mem_reg *new_mem)
 {
        struct ttm_operation_ctx ctx = { interruptible, no_wait_gpu };
-       struct radeon_device *rdev;
        struct ttm_mem_reg *old_mem = &bo->mem;
        struct ttm_mem_reg tmp_mem;
        struct ttm_placement placement;
        struct ttm_place placements;
        int r;
 
-       rdev = radeon_get_rdev(bo->bdev);
        tmp_mem = *new_mem;
        tmp_mem.mm_node = NULL;
        placement.num_placement = 1;