All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH DRM] drm: remove drm_mode_object_{un/reference} aliases
@ 2018-03-19  5:58 ` Haneen Mohammed
  0 siblings, 0 replies; 6+ messages in thread
From: Haneen Mohammed @ 2018-03-19  5:58 UTC (permalink / raw)
  To: hamohammed.sa; +Cc: David Airlie, dri-devel, outreachy-kernel, Daniel Vetter

This patch remove the compatibility aliases
drm_mode_object_{reference/unreference} of drm_mode_object_{get/put}
since all callers have been converted to the prefered _{get/put}.

Remove the helpers from the semantic patch drm-get-put-cocci.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
---
 include/drm/drm_mode_object.h            | 24 ------------------------
 scripts/coccinelle/api/drm-get-put.cocci | 10 ----------
 2 files changed, 34 deletions(-)

diff --git a/include/drm/drm_mode_object.h b/include/drm/drm_mode_object.h
index 7ba3913..c34a3e8 100644
--- a/include/drm/drm_mode_object.h
+++ b/include/drm/drm_mode_object.h
@@ -120,30 +120,6 @@ struct drm_mode_object *drm_mode_object_find(struct drm_device *dev,
 void drm_mode_object_get(struct drm_mode_object *obj);
 void drm_mode_object_put(struct drm_mode_object *obj);
 
-/**
- * drm_mode_object_reference - acquire a mode object reference
- * @obj: DRM mode object
- *
- * This is a compatibility alias for drm_mode_object_get() and should not be
- * used by new code.
- */
-static inline void drm_mode_object_reference(struct drm_mode_object *obj)
-{
-	drm_mode_object_get(obj);
-}
-
-/**
- * drm_mode_object_unreference - release a mode object reference
- * @obj: DRM mode object
- *
- * This is a compatibility alias for drm_mode_object_put() and should not be
- * used by new code.
- */
-static inline void drm_mode_object_unreference(struct drm_mode_object *obj)
-{
-	drm_mode_object_put(obj);
-}
-
 int drm_object_property_set_value(struct drm_mode_object *obj,
 				  struct drm_property *property,
 				  uint64_t val);
diff --git a/scripts/coccinelle/api/drm-get-put.cocci b/scripts/coccinelle/api/drm-get-put.cocci
index 91fceb8..ceb71ea 100644
--- a/scripts/coccinelle/api/drm-get-put.cocci
+++ b/scripts/coccinelle/api/drm-get-put.cocci
@@ -16,12 +16,6 @@ expression object;
 @@
 
 (
-- drm_mode_object_reference(object)
-+ drm_mode_object_get(object)
-|
-- drm_mode_object_unreference(object)
-+ drm_mode_object_put(object)
-|
 - drm_connector_reference(object)
 + drm_connector_get(object)
 |
@@ -62,10 +56,6 @@ position p;
 @@
 
 (
-drm_mode_object_unreference@p(object)
-|
-drm_mode_object_reference@p(object)
-|
 drm_connector_unreference@p(object)
 |
 drm_connector_reference@p(object)
-- 
2.7.4

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH DRM] drm: remove drm_mode_object_{un/reference} aliases
@ 2018-03-19  5:58 ` Haneen Mohammed
  0 siblings, 0 replies; 6+ messages in thread
From: Haneen Mohammed @ 2018-03-19  5:58 UTC (permalink / raw)
  To: hamohammed.sa
  Cc: Daniel Vetter, Gustavo Padovan, Sean Paul, David Airlie,
	dri-devel, outreachy-kernel

This patch remove the compatibility aliases
drm_mode_object_{reference/unreference} of drm_mode_object_{get/put}
since all callers have been converted to the prefered _{get/put}.

Remove the helpers from the semantic patch drm-get-put-cocci.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
---
 include/drm/drm_mode_object.h            | 24 ------------------------
 scripts/coccinelle/api/drm-get-put.cocci | 10 ----------
 2 files changed, 34 deletions(-)

diff --git a/include/drm/drm_mode_object.h b/include/drm/drm_mode_object.h
index 7ba3913..c34a3e8 100644
--- a/include/drm/drm_mode_object.h
+++ b/include/drm/drm_mode_object.h
@@ -120,30 +120,6 @@ struct drm_mode_object *drm_mode_object_find(struct drm_device *dev,
 void drm_mode_object_get(struct drm_mode_object *obj);
 void drm_mode_object_put(struct drm_mode_object *obj);
 
-/**
- * drm_mode_object_reference - acquire a mode object reference
- * @obj: DRM mode object
- *
- * This is a compatibility alias for drm_mode_object_get() and should not be
- * used by new code.
- */
-static inline void drm_mode_object_reference(struct drm_mode_object *obj)
-{
-	drm_mode_object_get(obj);
-}
-
-/**
- * drm_mode_object_unreference - release a mode object reference
- * @obj: DRM mode object
- *
- * This is a compatibility alias for drm_mode_object_put() and should not be
- * used by new code.
- */
-static inline void drm_mode_object_unreference(struct drm_mode_object *obj)
-{
-	drm_mode_object_put(obj);
-}
-
 int drm_object_property_set_value(struct drm_mode_object *obj,
 				  struct drm_property *property,
 				  uint64_t val);
diff --git a/scripts/coccinelle/api/drm-get-put.cocci b/scripts/coccinelle/api/drm-get-put.cocci
index 91fceb8..ceb71ea 100644
--- a/scripts/coccinelle/api/drm-get-put.cocci
+++ b/scripts/coccinelle/api/drm-get-put.cocci
@@ -16,12 +16,6 @@ expression object;
 @@
 
 (
-- drm_mode_object_reference(object)
-+ drm_mode_object_get(object)
-|
-- drm_mode_object_unreference(object)
-+ drm_mode_object_put(object)
-|
 - drm_connector_reference(object)
 + drm_connector_get(object)
 |
@@ -62,10 +56,6 @@ position p;
 @@
 
 (
-drm_mode_object_unreference@p(object)
-|
-drm_mode_object_reference@p(object)
-|
 drm_connector_unreference@p(object)
 |
 drm_connector_reference@p(object)
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH DRM] drm: remove drm_mode_object_{un/reference} aliases
  2018-03-19  5:58 ` Haneen Mohammed
@ 2018-03-19 13:16   ` Sean Paul
  -1 siblings, 0 replies; 6+ messages in thread
From: Sean Paul @ 2018-03-19 13:16 UTC (permalink / raw)
  To: Haneen Mohammed; +Cc: David Airlie, dri-devel, outreachy-kernel, Daniel Vetter

On Mon, Mar 19, 2018 at 01:58:20AM -0400, Haneen Mohammed wrote:
> This patch remove the compatibility aliases
> drm_mode_object_{reference/unreference} of drm_mode_object_{get/put}
> since all callers have been converted to the prefered _{get/put}.
> 
> Remove the helpers from the semantic patch drm-get-put-cocci.
> 
> Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>

Thanks for your patch, applied to drm-misc-next.

Sean

> ---
>  include/drm/drm_mode_object.h            | 24 ------------------------
>  scripts/coccinelle/api/drm-get-put.cocci | 10 ----------
>  2 files changed, 34 deletions(-)
> 
> diff --git a/include/drm/drm_mode_object.h b/include/drm/drm_mode_object.h
> index 7ba3913..c34a3e8 100644
> --- a/include/drm/drm_mode_object.h
> +++ b/include/drm/drm_mode_object.h
> @@ -120,30 +120,6 @@ struct drm_mode_object *drm_mode_object_find(struct drm_device *dev,
>  void drm_mode_object_get(struct drm_mode_object *obj);
>  void drm_mode_object_put(struct drm_mode_object *obj);
>  
> -/**
> - * drm_mode_object_reference - acquire a mode object reference
> - * @obj: DRM mode object
> - *
> - * This is a compatibility alias for drm_mode_object_get() and should not be
> - * used by new code.
> - */
> -static inline void drm_mode_object_reference(struct drm_mode_object *obj)
> -{
> -	drm_mode_object_get(obj);
> -}
> -
> -/**
> - * drm_mode_object_unreference - release a mode object reference
> - * @obj: DRM mode object
> - *
> - * This is a compatibility alias for drm_mode_object_put() and should not be
> - * used by new code.
> - */
> -static inline void drm_mode_object_unreference(struct drm_mode_object *obj)
> -{
> -	drm_mode_object_put(obj);
> -}
> -
>  int drm_object_property_set_value(struct drm_mode_object *obj,
>  				  struct drm_property *property,
>  				  uint64_t val);
> diff --git a/scripts/coccinelle/api/drm-get-put.cocci b/scripts/coccinelle/api/drm-get-put.cocci
> index 91fceb8..ceb71ea 100644
> --- a/scripts/coccinelle/api/drm-get-put.cocci
> +++ b/scripts/coccinelle/api/drm-get-put.cocci
> @@ -16,12 +16,6 @@ expression object;
>  @@
>  
>  (
> -- drm_mode_object_reference(object)
> -+ drm_mode_object_get(object)
> -|
> -- drm_mode_object_unreference(object)
> -+ drm_mode_object_put(object)
> -|
>  - drm_connector_reference(object)
>  + drm_connector_get(object)
>  |
> @@ -62,10 +56,6 @@ position p;
>  @@
>  
>  (
> -drm_mode_object_unreference@p(object)
> -|
> -drm_mode_object_reference@p(object)
> -|
>  drm_connector_unreference@p(object)
>  |
>  drm_connector_reference@p(object)
> -- 
> 2.7.4
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH DRM] drm: remove drm_mode_object_{un/reference} aliases
@ 2018-03-19 13:16   ` Sean Paul
  0 siblings, 0 replies; 6+ messages in thread
From: Sean Paul @ 2018-03-19 13:16 UTC (permalink / raw)
  To: Haneen Mohammed
  Cc: Daniel Vetter, Gustavo Padovan, Sean Paul, David Airlie,
	dri-devel, outreachy-kernel

On Mon, Mar 19, 2018 at 01:58:20AM -0400, Haneen Mohammed wrote:
> This patch remove the compatibility aliases
> drm_mode_object_{reference/unreference} of drm_mode_object_{get/put}
> since all callers have been converted to the prefered _{get/put}.
> 
> Remove the helpers from the semantic patch drm-get-put-cocci.
> 
> Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>

Thanks for your patch, applied to drm-misc-next.

Sean

> ---
>  include/drm/drm_mode_object.h            | 24 ------------------------
>  scripts/coccinelle/api/drm-get-put.cocci | 10 ----------
>  2 files changed, 34 deletions(-)
> 
> diff --git a/include/drm/drm_mode_object.h b/include/drm/drm_mode_object.h
> index 7ba3913..c34a3e8 100644
> --- a/include/drm/drm_mode_object.h
> +++ b/include/drm/drm_mode_object.h
> @@ -120,30 +120,6 @@ struct drm_mode_object *drm_mode_object_find(struct drm_device *dev,
>  void drm_mode_object_get(struct drm_mode_object *obj);
>  void drm_mode_object_put(struct drm_mode_object *obj);
>  
> -/**
> - * drm_mode_object_reference - acquire a mode object reference
> - * @obj: DRM mode object
> - *
> - * This is a compatibility alias for drm_mode_object_get() and should not be
> - * used by new code.
> - */
> -static inline void drm_mode_object_reference(struct drm_mode_object *obj)
> -{
> -	drm_mode_object_get(obj);
> -}
> -
> -/**
> - * drm_mode_object_unreference - release a mode object reference
> - * @obj: DRM mode object
> - *
> - * This is a compatibility alias for drm_mode_object_put() and should not be
> - * used by new code.
> - */
> -static inline void drm_mode_object_unreference(struct drm_mode_object *obj)
> -{
> -	drm_mode_object_put(obj);
> -}
> -
>  int drm_object_property_set_value(struct drm_mode_object *obj,
>  				  struct drm_property *property,
>  				  uint64_t val);
> diff --git a/scripts/coccinelle/api/drm-get-put.cocci b/scripts/coccinelle/api/drm-get-put.cocci
> index 91fceb8..ceb71ea 100644
> --- a/scripts/coccinelle/api/drm-get-put.cocci
> +++ b/scripts/coccinelle/api/drm-get-put.cocci
> @@ -16,12 +16,6 @@ expression object;
>  @@
>  
>  (
> -- drm_mode_object_reference(object)
> -+ drm_mode_object_get(object)
> -|
> -- drm_mode_object_unreference(object)
> -+ drm_mode_object_put(object)
> -|
>  - drm_connector_reference(object)
>  + drm_connector_get(object)
>  |
> @@ -62,10 +56,6 @@ position p;
>  @@
>  
>  (
> -drm_mode_object_unreference@p(object)
> -|
> -drm_mode_object_reference@p(object)
> -|
>  drm_connector_unreference@p(object)
>  |
>  drm_connector_reference@p(object)
> -- 
> 2.7.4
> 

-- 
Sean Paul, Software Engineer, Google / Chromium OS


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Outreachy kernel] [PATCH DRM] drm: remove drm_mode_object_{un/reference} aliases
  2018-03-19  5:58 ` Haneen Mohammed
@ 2018-03-19 14:13   ` Daniel Vetter
  -1 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2018-03-19 14:13 UTC (permalink / raw)
  To: Haneen Mohammed; +Cc: David Airlie, dri-devel, outreachy-kernel, Daniel Vetter

On Mon, Mar 19, 2018 at 01:58:20AM -0400, Haneen Mohammed wrote:
> This patch remove the compatibility aliases
> drm_mode_object_{reference/unreference} of drm_mode_object_{get/put}
> since all callers have been converted to the prefered _{get/put}.
> 
> Remove the helpers from the semantic patch drm-get-put-cocci.
> 
> Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>

Yay, one set down, a few more to go!

Thanks for taking care of this.
-Daniel

> ---
>  include/drm/drm_mode_object.h            | 24 ------------------------
>  scripts/coccinelle/api/drm-get-put.cocci | 10 ----------
>  2 files changed, 34 deletions(-)
> 
> diff --git a/include/drm/drm_mode_object.h b/include/drm/drm_mode_object.h
> index 7ba3913..c34a3e8 100644
> --- a/include/drm/drm_mode_object.h
> +++ b/include/drm/drm_mode_object.h
> @@ -120,30 +120,6 @@ struct drm_mode_object *drm_mode_object_find(struct drm_device *dev,
>  void drm_mode_object_get(struct drm_mode_object *obj);
>  void drm_mode_object_put(struct drm_mode_object *obj);
>  
> -/**
> - * drm_mode_object_reference - acquire a mode object reference
> - * @obj: DRM mode object
> - *
> - * This is a compatibility alias for drm_mode_object_get() and should not be
> - * used by new code.
> - */
> -static inline void drm_mode_object_reference(struct drm_mode_object *obj)
> -{
> -	drm_mode_object_get(obj);
> -}
> -
> -/**
> - * drm_mode_object_unreference - release a mode object reference
> - * @obj: DRM mode object
> - *
> - * This is a compatibility alias for drm_mode_object_put() and should not be
> - * used by new code.
> - */
> -static inline void drm_mode_object_unreference(struct drm_mode_object *obj)
> -{
> -	drm_mode_object_put(obj);
> -}
> -
>  int drm_object_property_set_value(struct drm_mode_object *obj,
>  				  struct drm_property *property,
>  				  uint64_t val);
> diff --git a/scripts/coccinelle/api/drm-get-put.cocci b/scripts/coccinelle/api/drm-get-put.cocci
> index 91fceb8..ceb71ea 100644
> --- a/scripts/coccinelle/api/drm-get-put.cocci
> +++ b/scripts/coccinelle/api/drm-get-put.cocci
> @@ -16,12 +16,6 @@ expression object;
>  @@
>  
>  (
> -- drm_mode_object_reference(object)
> -+ drm_mode_object_get(object)
> -|
> -- drm_mode_object_unreference(object)
> -+ drm_mode_object_put(object)
> -|
>  - drm_connector_reference(object)
>  + drm_connector_get(object)
>  |
> @@ -62,10 +56,6 @@ position p;
>  @@
>  
>  (
> -drm_mode_object_unreference@p(object)
> -|
> -drm_mode_object_reference@p(object)
> -|
>  drm_connector_unreference@p(object)
>  |
>  drm_connector_reference@p(object)
> -- 
> 2.7.4
> 
> -- 
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20180319055820.GA17502%40haneen-VirtualBox.
> For more options, visit https://groups.google.com/d/optout.

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Outreachy kernel] [PATCH DRM] drm: remove drm_mode_object_{un/reference} aliases
@ 2018-03-19 14:13   ` Daniel Vetter
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2018-03-19 14:13 UTC (permalink / raw)
  To: Haneen Mohammed
  Cc: Daniel Vetter, Gustavo Padovan, Sean Paul, David Airlie,
	dri-devel, outreachy-kernel

On Mon, Mar 19, 2018 at 01:58:20AM -0400, Haneen Mohammed wrote:
> This patch remove the compatibility aliases
> drm_mode_object_{reference/unreference} of drm_mode_object_{get/put}
> since all callers have been converted to the prefered _{get/put}.
> 
> Remove the helpers from the semantic patch drm-get-put-cocci.
> 
> Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>

Yay, one set down, a few more to go!

Thanks for taking care of this.
-Daniel

> ---
>  include/drm/drm_mode_object.h            | 24 ------------------------
>  scripts/coccinelle/api/drm-get-put.cocci | 10 ----------
>  2 files changed, 34 deletions(-)
> 
> diff --git a/include/drm/drm_mode_object.h b/include/drm/drm_mode_object.h
> index 7ba3913..c34a3e8 100644
> --- a/include/drm/drm_mode_object.h
> +++ b/include/drm/drm_mode_object.h
> @@ -120,30 +120,6 @@ struct drm_mode_object *drm_mode_object_find(struct drm_device *dev,
>  void drm_mode_object_get(struct drm_mode_object *obj);
>  void drm_mode_object_put(struct drm_mode_object *obj);
>  
> -/**
> - * drm_mode_object_reference - acquire a mode object reference
> - * @obj: DRM mode object
> - *
> - * This is a compatibility alias for drm_mode_object_get() and should not be
> - * used by new code.
> - */
> -static inline void drm_mode_object_reference(struct drm_mode_object *obj)
> -{
> -	drm_mode_object_get(obj);
> -}
> -
> -/**
> - * drm_mode_object_unreference - release a mode object reference
> - * @obj: DRM mode object
> - *
> - * This is a compatibility alias for drm_mode_object_put() and should not be
> - * used by new code.
> - */
> -static inline void drm_mode_object_unreference(struct drm_mode_object *obj)
> -{
> -	drm_mode_object_put(obj);
> -}
> -
>  int drm_object_property_set_value(struct drm_mode_object *obj,
>  				  struct drm_property *property,
>  				  uint64_t val);
> diff --git a/scripts/coccinelle/api/drm-get-put.cocci b/scripts/coccinelle/api/drm-get-put.cocci
> index 91fceb8..ceb71ea 100644
> --- a/scripts/coccinelle/api/drm-get-put.cocci
> +++ b/scripts/coccinelle/api/drm-get-put.cocci
> @@ -16,12 +16,6 @@ expression object;
>  @@
>  
>  (
> -- drm_mode_object_reference(object)
> -+ drm_mode_object_get(object)
> -|
> -- drm_mode_object_unreference(object)
> -+ drm_mode_object_put(object)
> -|
>  - drm_connector_reference(object)
>  + drm_connector_get(object)
>  |
> @@ -62,10 +56,6 @@ position p;
>  @@
>  
>  (
> -drm_mode_object_unreference@p(object)
> -|
> -drm_mode_object_reference@p(object)
> -|
>  drm_connector_unreference@p(object)
>  |
>  drm_connector_reference@p(object)
> -- 
> 2.7.4
> 
> -- 
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20180319055820.GA17502%40haneen-VirtualBox.
> For more options, visit https://groups.google.com/d/optout.

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-03-19 14:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-19  5:58 [PATCH DRM] drm: remove drm_mode_object_{un/reference} aliases Haneen Mohammed
2018-03-19  5:58 ` Haneen Mohammed
2018-03-19 13:16 ` Sean Paul
2018-03-19 13:16   ` Sean Paul
2018-03-19 14:13 ` [Outreachy kernel] " Daniel Vetter
2018-03-19 14:13   ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.