Skip to content

Commit e007488

Browse files
haneensaatseanpaul
authored andcommitted
drm: remove drm_mode_object_{un/reference} aliases
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> Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180319055820.GA17502@haneen-VirtualBox
1 parent c5fe473 commit e007488

2 files changed

Lines changed: 0 additions & 34 deletions

File tree

‎include/drm/drm_mode_object.h‎

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -120,30 +120,6 @@ struct drm_mode_object *drm_mode_object_find(struct drm_device *dev,
120120
void drm_mode_object_get(struct drm_mode_object *obj);
121121
void drm_mode_object_put(struct drm_mode_object *obj);
122122

123-
/**
124-
* drm_mode_object_reference - acquire a mode object reference
125-
* @obj: DRM mode object
126-
*
127-
* This is a compatibility alias for drm_mode_object_get() and should not be
128-
* used by new code.
129-
*/
130-
static inline void drm_mode_object_reference(struct drm_mode_object *obj)
131-
{
132-
drm_mode_object_get(obj);
133-
}
134-
135-
/**
136-
* drm_mode_object_unreference - release a mode object reference
137-
* @obj: DRM mode object
138-
*
139-
* This is a compatibility alias for drm_mode_object_put() and should not be
140-
* used by new code.
141-
*/
142-
static inline void drm_mode_object_unreference(struct drm_mode_object *obj)
143-
{
144-
drm_mode_object_put(obj);
145-
}
146-
147123
int drm_object_property_set_value(struct drm_mode_object *obj,
148124
struct drm_property *property,
149125
uint64_t val);

‎scripts/coccinelle/api/drm-get-put.cocci‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ expression object;
1616
@@
1717

1818
(
19-
- drm_mode_object_reference(object)
20-
+ drm_mode_object_get(object)
21-
|
22-
- drm_mode_object_unreference(object)
23-
+ drm_mode_object_put(object)
24-
|
2519
- drm_connector_reference(object)
2620
+ drm_connector_get(object)
2721
|
@@ -62,10 +56,6 @@ position p;
6256
@@
6357

6458
(
65-
drm_mode_object_unreference@p(object)
66-
|
67-
drm_mode_object_reference@p(object)
68-
|
6959
drm_connector_unreference@p(object)
7060
|
7161
drm_connector_reference@p(object)

0 commit comments

Comments
 (0)