diff mbox series

[2/2] drm/etnaviv: remove unused function etnaviv_gem_mapping_reference

Message ID 20190705171536.26727-2-l.stach@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/etnaviv: fix etnaviv_cmdbuf_suballoc_new return value | expand

Commit Message

Lucas Stach July 5, 2019, 5:15 p.m. UTC
Hasn't been used for quite a while. There is no point in keeping
unused code around.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 drivers/gpu/drm/etnaviv/etnaviv_gem.c | 12 ------------
 drivers/gpu/drm/etnaviv/etnaviv_gem.h |  1 -
 2 files changed, 13 deletions(-)

Comments

Philipp Zabel July 24, 2019, 10:51 a.m. UTC | #1
On Fri, 2019-07-05 at 19:15 +0200, Lucas Stach wrote:
> Hasn't been used for quite a while. There is no point in keeping
> unused code around.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp

> ---
>  drivers/gpu/drm/etnaviv/etnaviv_gem.c | 12 ------------
>  drivers/gpu/drm/etnaviv/etnaviv_gem.h |  1 -
>  2 files changed, 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
> index 727bb3f5ceb2..e199a6833ff0 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_gem.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
> @@ -235,18 +235,6 @@ etnaviv_gem_get_vram_mapping(struct etnaviv_gem_object *obj,
>  	return NULL;
>  }
>  
> -void etnaviv_gem_mapping_reference(struct etnaviv_vram_mapping *mapping)
> -{
> -	struct etnaviv_gem_object *etnaviv_obj = mapping->object;
> -
> -	drm_gem_object_get(&etnaviv_obj->base);
> -
> -	mutex_lock(&etnaviv_obj->lock);
> -	WARN_ON(mapping->use == 0);
> -	mapping->use += 1;
> -	mutex_unlock(&etnaviv_obj->lock);
> -}
> -
>  void etnaviv_gem_mapping_unreference(struct etnaviv_vram_mapping *mapping)
>  {
>  	struct etnaviv_gem_object *etnaviv_obj = mapping->object;
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.h b/drivers/gpu/drm/etnaviv/etnaviv_gem.h
> index 753c458497d0..d7d8a835f379 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_gem.h
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.h
> @@ -120,7 +120,6 @@ void etnaviv_gem_put_pages(struct etnaviv_gem_object *obj);
>  
>  struct etnaviv_vram_mapping *etnaviv_gem_mapping_get(
>  	struct drm_gem_object *obj, struct etnaviv_gpu *gpu);
> -void etnaviv_gem_mapping_reference(struct etnaviv_vram_mapping *mapping);
>  void etnaviv_gem_mapping_unreference(struct etnaviv_vram_mapping *mapping);
>  
>  #endif /* __ETNAVIV_GEM_H__ */
Guido Günther Aug. 2, 2019, 8:20 a.m. UTC | #2
Hi,
On Fri, Jul 05, 2019 at 07:15:36PM +0200, Lucas Stach wrote:
> Hasn't been used for quite a while. There is no point in keeping
> unused code around.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> ---
>  drivers/gpu/drm/etnaviv/etnaviv_gem.c | 12 ------------
>  drivers/gpu/drm/etnaviv/etnaviv_gem.h |  1 -
>  2 files changed, 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
> index 727bb3f5ceb2..e199a6833ff0 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_gem.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
> @@ -235,18 +235,6 @@ etnaviv_gem_get_vram_mapping(struct etnaviv_gem_object *obj,
>  	return NULL;
>  }
>  
> -void etnaviv_gem_mapping_reference(struct etnaviv_vram_mapping *mapping)
> -{
> -	struct etnaviv_gem_object *etnaviv_obj = mapping->object;
> -
> -	drm_gem_object_get(&etnaviv_obj->base);
> -
> -	mutex_lock(&etnaviv_obj->lock);
> -	WARN_ON(mapping->use == 0);
> -	mapping->use += 1;
> -	mutex_unlock(&etnaviv_obj->lock);
> -}
> -
>  void etnaviv_gem_mapping_unreference(struct etnaviv_vram_mapping *mapping)
>  {
>  	struct etnaviv_gem_object *etnaviv_obj = mapping->object;
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.h b/drivers/gpu/drm/etnaviv/etnaviv_gem.h
> index 753c458497d0..d7d8a835f379 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_gem.h
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.h
> @@ -120,7 +120,6 @@ void etnaviv_gem_put_pages(struct etnaviv_gem_object *obj);
>  
>  struct etnaviv_vram_mapping *etnaviv_gem_mapping_get(
>  	struct drm_gem_object *obj, struct etnaviv_gpu *gpu);
> -void etnaviv_gem_mapping_reference(struct etnaviv_vram_mapping *mapping);
>  void etnaviv_gem_mapping_unreference(struct etnaviv_vram_mapping *mapping);
>  
>  #endif /* __ETNAVIV_GEM_H__ */

Reviewed-by: Guido Günther <agx@sigxcpu.org> 
cheers,
 -- Guido

> -- 
> 2.20.1
> 
> _______________________________________________
> etnaviv mailing list
> etnaviv@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/etnaviv
diff mbox series

Patch

diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
index 727bb3f5ceb2..e199a6833ff0 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
@@ -235,18 +235,6 @@  etnaviv_gem_get_vram_mapping(struct etnaviv_gem_object *obj,
 	return NULL;
 }
 
-void etnaviv_gem_mapping_reference(struct etnaviv_vram_mapping *mapping)
-{
-	struct etnaviv_gem_object *etnaviv_obj = mapping->object;
-
-	drm_gem_object_get(&etnaviv_obj->base);
-
-	mutex_lock(&etnaviv_obj->lock);
-	WARN_ON(mapping->use == 0);
-	mapping->use += 1;
-	mutex_unlock(&etnaviv_obj->lock);
-}
-
 void etnaviv_gem_mapping_unreference(struct etnaviv_vram_mapping *mapping)
 {
 	struct etnaviv_gem_object *etnaviv_obj = mapping->object;
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.h b/drivers/gpu/drm/etnaviv/etnaviv_gem.h
index 753c458497d0..d7d8a835f379 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem.h
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.h
@@ -120,7 +120,6 @@  void etnaviv_gem_put_pages(struct etnaviv_gem_object *obj);
 
 struct etnaviv_vram_mapping *etnaviv_gem_mapping_get(
 	struct drm_gem_object *obj, struct etnaviv_gpu *gpu);
-void etnaviv_gem_mapping_reference(struct etnaviv_vram_mapping *mapping);
 void etnaviv_gem_mapping_unreference(struct etnaviv_vram_mapping *mapping);
 
 #endif /* __ETNAVIV_GEM_H__ */