Commit 45230903 authored by YueHaibing's avatar YueHaibing Committed by Gerd Hoffmann

drm/qxl: remove set but not used variable 'map'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/qxl/qxl_object.c: In function 'qxl_bo_kunmap_atomic_page':
drivers/gpu/drm/qxl/qxl_object.c:189:21: warning:
 variable 'map' set but not used [-Wunused-but-set-variable]
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1541821486-40631-1-git-send-email-yuehaibing@huawei.comSigned-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent 040b595a
...@@ -186,13 +186,9 @@ void qxl_bo_kunmap_atomic_page(struct qxl_device *qdev, ...@@ -186,13 +186,9 @@ void qxl_bo_kunmap_atomic_page(struct qxl_device *qdev,
struct qxl_bo *bo, void *pmap) struct qxl_bo *bo, void *pmap)
{ {
struct ttm_mem_type_manager *man = &bo->tbo.bdev->man[bo->tbo.mem.mem_type]; struct ttm_mem_type_manager *man = &bo->tbo.bdev->man[bo->tbo.mem.mem_type];
struct io_mapping *map;
if (bo->tbo.mem.mem_type == TTM_PL_VRAM) if ((bo->tbo.mem.mem_type != TTM_PL_VRAM) &&
map = qdev->vram_mapping; (bo->tbo.mem.mem_type != TTM_PL_PRIV))
else if (bo->tbo.mem.mem_type == TTM_PL_PRIV)
map = qdev->surface_mapping;
else
goto fallback; goto fallback;
io_mapping_unmap_atomic(pmap); io_mapping_unmap_atomic(pmap);
...@@ -200,7 +196,7 @@ void qxl_bo_kunmap_atomic_page(struct qxl_device *qdev, ...@@ -200,7 +196,7 @@ void qxl_bo_kunmap_atomic_page(struct qxl_device *qdev,
(void) ttm_mem_io_lock(man, false); (void) ttm_mem_io_lock(man, false);
ttm_mem_io_free(bo->tbo.bdev, &bo->tbo.mem); ttm_mem_io_free(bo->tbo.bdev, &bo->tbo.mem);
ttm_mem_io_unlock(man); ttm_mem_io_unlock(man);
return ; return;
fallback: fallback:
qxl_bo_kunmap(bo); qxl_bo_kunmap(bo);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment