Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Haneen Mohammed and committed by
Sean Paul
e007488b c5fe4732

-34
-24
include/drm/drm_mode_object.h
··· 120 120 void drm_mode_object_get(struct drm_mode_object *obj); 121 121 void drm_mode_object_put(struct drm_mode_object *obj); 122 122 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 - 147 123 int drm_object_property_set_value(struct drm_mode_object *obj, 148 124 struct drm_property *property, 149 125 uint64_t val);
-10
scripts/coccinelle/api/drm-get-put.cocci
··· 16 16 @@ 17 17 18 18 ( 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 - | 25 19 - drm_connector_reference(object) 26 20 + drm_connector_get(object) 27 21 | ··· 56 62 @@ 57 63 58 64 ( 59 - drm_mode_object_unreference@p(object) 60 - | 61 - drm_mode_object_reference@p(object) 62 - | 63 65 drm_connector_unreference@p(object) 64 66 | 65 67 drm_connector_reference@p(object)