[PATCH 83/85] drivers: gpu: Mark functions as static and removeunused function in vmwgfx_resource.c

From: Rashika Kheria
Date: Mon Jan 06 2014 - 11:49:28 EST


Mark functions as static because they are not used outside the file
drm/vmwgfx/vmwgfx_resource.c. Also, remove unused function
vmw_user_dmabuf_reference() from drm/vmwgfx/vmwgfx_resource.c.

This eliminates the following warnings in drm/vmwgfx/vmwgfx_resource.c:
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:252:22: warning: no previous prototype for âvmw_resource_lookupâ [-Wmissing-prototypes]
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:456:5: warning: no previous prototype for âvmw_user_dmabuf_allocâ [-Wmissing-prototypes]
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:593:5: warning: no previous prototype for âvmw_user_dmabuf_referenceâ [-Wmissing-prototypes]
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:1145:5: warning: no previous prototype for âvmw_resource_do_evictâ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@xxxxxxxxx>
Reviewed-by: Josh Triplett <josh@xxxxxxxxxxxxxxxx>
---
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
index 9b5ea2a..5fefc65 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
@@ -249,7 +249,7 @@ void vmw_resource_activate(struct vmw_resource *res,
write_unlock(&dev_priv->resource_lock);
}

-struct vmw_resource *vmw_resource_lookup(struct vmw_private *dev_priv,
+static struct vmw_resource *vmw_resource_lookup(struct vmw_private *dev_priv,
struct idr *idr, int id)
{
struct vmw_resource *res;
@@ -453,7 +453,7 @@ static void vmw_user_dmabuf_release(struct ttm_base_object **p_base)
* @p_dma_buf: Pointer to where the refcounted struct vmw_dma_buffer pointer
* should be assigned.
*/
-int vmw_user_dmabuf_alloc(struct vmw_private *dev_priv,
+static int vmw_user_dmabuf_alloc(struct vmw_private *dev_priv,
struct ttm_object_file *tfile,
uint32_t size,
bool shareable,
@@ -590,19 +590,6 @@ int vmw_user_dmabuf_lookup(struct ttm_object_file *tfile,
return 0;
}

-int vmw_user_dmabuf_reference(struct ttm_object_file *tfile,
- struct vmw_dma_buffer *dma_buf)
-{
- struct vmw_user_dma_buffer *user_bo;
-
- if (dma_buf->base.destroy != vmw_user_dmabuf_destroy)
- return -EINVAL;
-
- user_bo = container_of(dma_buf, struct vmw_user_dma_buffer, dma);
- return ttm_ref_object_add(tfile, &user_bo->prime.base,
- TTM_REF_USAGE, NULL);
-}
-
/*
* Stream management
*/
@@ -1142,7 +1129,7 @@ vmw_resource_backoff_reservation(struct ttm_validate_buffer *val_buf)
* @res: The resource to evict.
* @interruptible: Whether to wait interruptible.
*/
-int vmw_resource_do_evict(struct vmw_resource *res, bool interruptible)
+static int vmw_resource_do_evict(struct vmw_resource *res, bool interruptible)
{
struct ttm_validate_buffer val_buf;
const struct vmw_res_func *func = res->func;
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/