[PATCH 4/7] drm: Replace __drm_gem_object_unreference with __drm_gem_object_put

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch unifies the naming of DRM functions for reference counting
of struct drm_gem_object. The resulting code is more aligned with the
rest of the Linux kernel interfaces.

The patch also deletes the old function and removes it from the
Coccinelle script.

Signed-off-by: Thomas Zimmermann <tdz@xxxxxxxxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/i915/i915_gem_object.h   |  2 +-
 include/drm/drm_gem.h                    | 13 -------------
 scripts/coccinelle/api/drm-get-put.cocci |  5 -----
 3 files changed, 1 insertion(+), 19 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_object.h b/drivers/gpu/drm/i915/i915_gem_object.h
index da6e849f41a4..0042496216fe 100644
--- a/drivers/gpu/drm/i915/i915_gem_object.h
+++ b/drivers/gpu/drm/i915/i915_gem_object.h
@@ -345,7 +345,7 @@ __attribute__((nonnull))
 static inline void
 i915_gem_object_put(struct drm_i915_gem_object *obj)
 {
-	__drm_gem_object_unreference(&obj->base);
+	__drm_gem_object_put(&obj->base);
 }
 
 __deprecated
diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h
index 43465aa4eb73..2c3f04e071cf 100644
--- a/include/drm/drm_gem.h
+++ b/include/drm/drm_gem.h
@@ -222,19 +222,6 @@ __drm_gem_object_put(struct drm_gem_object *obj)
 void drm_gem_object_put_unlocked(struct drm_gem_object *obj);
 void drm_gem_object_put(struct drm_gem_object *obj);
 
-/**
- * __drm_gem_object_unreference - raw function to release a GEM buffer object
- *                                reference
- * @obj: GEM buffer object
- *
- * This is a compatibility alias for __drm_gem_object_put() and should not be
- * used by new code.
- */
-static inline void __drm_gem_object_unreference(struct drm_gem_object *obj)
-{
-	__drm_gem_object_put(obj);
-}
-
 /**
  * drm_gem_object_unreference_unlocked - release a GEM buffer object reference
  * @obj: GEM buffer object
diff --git a/scripts/coccinelle/api/drm-get-put.cocci b/scripts/coccinelle/api/drm-get-put.cocci
index c37aa5beca77..4a948790b83c 100644
--- a/scripts/coccinelle/api/drm-get-put.cocci
+++ b/scripts/coccinelle/api/drm-get-put.cocci
@@ -16,9 +16,6 @@ expression object;
 @@
 
 (
-- __drm_gem_object_unreference(object)
-+ __drm_gem_object_put(object)
-|
 - drm_gem_object_unreference_unlocked(object)
 + drm_gem_object_put_unlocked(object)
 |
@@ -32,8 +29,6 @@ position p;
 @@
 
 (
-__drm_gem_object_unreference(object)
-|
 drm_gem_object_unreference_unlocked(object)
 |
 drm_dev_unref@p(object)
-- 
2.14.4

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux