[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1419092158-6896-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
Date: Sat, 20 Dec 2014 17:15:58 +0100
From: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To: David Airlie <airlied@...ux.ie>, Dave Airlie <airlied@...hat.com>
Cc: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>,
David Herrmann <dh.herrmann@...il.com>,
Alex Deucher <alexander.deucher@....com>,
Josh Triplett <josh@...htriplett.org>,
Daniel Vetter <daniel.vetter@...ll.ch>,
Rashika <rashika.kheria@...il.com>,
Christian König <christian.koenig@....com>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: [PATCH] gpu: drm: ast: ast_ttm.c: Remove unused function
Remove the function ast_bo_unpin() that is not used anywhere.
This was partially found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
---
drivers/gpu/drm/ast/ast_drv.h | 1 -
drivers/gpu/drm/ast/ast_ttm.c | 20 --------------------
2 files changed, 21 deletions(-)
diff --git a/drivers/gpu/drm/ast/ast_drv.h b/drivers/gpu/drm/ast/ast_drv.h
index 86205a2..1f8db90 100644
--- a/drivers/gpu/drm/ast/ast_drv.h
+++ b/drivers/gpu/drm/ast/ast_drv.h
@@ -361,7 +361,6 @@ int ast_gem_create(struct drm_device *dev,
struct drm_gem_object **obj);
int ast_bo_pin(struct ast_bo *bo, u32 pl_flag, u64 *gpu_addr);
-int ast_bo_unpin(struct ast_bo *bo);
static inline int ast_bo_reserve(struct ast_bo *bo, bool no_wait)
{
diff --git a/drivers/gpu/drm/ast/ast_ttm.c b/drivers/gpu/drm/ast/ast_ttm.c
index 08f82ea..f7c183a 100644
--- a/drivers/gpu/drm/ast/ast_ttm.c
+++ b/drivers/gpu/drm/ast/ast_ttm.c
@@ -375,26 +375,6 @@ int ast_bo_pin(struct ast_bo *bo, u32 pl_flag, u64 *gpu_addr)
return 0;
}
-int ast_bo_unpin(struct ast_bo *bo)
-{
- int i, ret;
- if (!bo->pin_count) {
- DRM_ERROR("unpin bad %p\n", bo);
- return 0;
- }
- bo->pin_count--;
- if (bo->pin_count)
- return 0;
-
- for (i = 0; i < bo->placement.num_placement ; i++)
- bo->placements[i].flags &= ~TTM_PL_FLAG_NO_EVICT;
- ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false);
- if (ret)
- return ret;
-
- return 0;
-}
-
int ast_bo_push_sysram(struct ast_bo *bo)
{
int i, ret;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists